@nethesis/phone-island
Version:
NethVoice CTI Phone Island
3 lines (2 loc) • 1.68 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),o=require("../node_modules/@fortawesome/react-fontawesome/index.es.js"),a=require("../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js"),t=require("../node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=i(e),n={open:{width:"56px",height:"56px",borderRadius:"26px"},closed:{width:"24px",height:"24px",borderRadius:"26px"}};exports.GenericAvatar=function(e){var i=e.avatarUrl,s=e.size,c=void 0===s?"open":s,d=e.showPulseEffect,l=void 0!==d&&d,p=e.pulseColor,u=void 0===p?"pi-bg-gray-600":p,m=e.backgroundColorClass,v=void 0===m?"pi-bg-gray-500 dark:pi-bg-gray-600":m,f=e.borderRadius,b=void 0===f?"pi-rounded-full":f,g=e.fallbackIcon,x=void 0===g?a.faUser:g,y=e.fallbackIconColor,h=void 0===y?"pi-text-white pi-text-2xl":y,j=e.className,k=void 0===j?"":j;return r.default.createElement(t.motion.div,{className:"pi-relative ".concat(k),animate:c,variants:n},l&&r.default.createElement(t.motion.div,{style:{animationDuration:"2s"},animate:c,variants:n,className:"".concat(b," ").concat(u," pi-absolute pi-opacity-60 pi-top-0 pi-left-0 pi-animate-ping")}),r.default.createElement(t.motion.div,{className:"pi-relative pi-z-30 ".concat(v," ").concat(b," pi-bg-cover pi-flex pi-items-center pi-justify-center"),style:{backgroundImage:i?"url(".concat(i,")"):"none",backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center"},animate:c,variants:n},!i&&r.default.createElement(o.FontAwesomeIcon,{icon:x,className:h})))};
//# sourceMappingURL=GenericAvatar.js.map