How to use the wix-ui-core/dist/src/components/avatar/avatar.uni.driver.avatarDriverFactory function in wix-ui-core

To help you get started, we’ve selected a few wix-ui-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wix / wix-ui-tpa / src / components / Avatar / Avatar.driver.ts View on Github external
export const avatarDriverFactory = (base: UniDriver): AvatarDriver => {
  return {
    ...coreAvatarDriverFactory(base),
    src: async () => {
      try {
        return base.$('img').attr('src');
      } catch (e) {}

      return '';
    },
  };
};