UNPKG

@adyen/kyc-components

Version:

This guide assumes that you have already an account with Adyen. A legalEntity needs to be created, and you need to have a `legalEntityId` to instatiate a Component.

55 lines (54 loc) 2.43 kB
try { let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "7e89ab28-1f82-4435-8130-3bd8a1d6a1d1", e._sentryDebugIdIdentifier = "sentry-dbid-7e89ab28-1f82-4435-8130-3bd8a1d6a1d1"); } catch (e) {} import { a as Icon } from "./translation-BYvhW5zA.js"; import cx from "classnames"; import { jsx } from "preact/jsx-runtime"; var Avatar_module_default = { avatar: "_avatar_106yh_1", "avatar-label": "_avatar-label_106yh_16", avatarLabel: "_avatar-label_106yh_16", "avatar-primary": "_avatar-primary_106yh_27", avatarPrimary: "_avatar-primary_106yh_27", "avatar-secondary": "_avatar-secondary_106yh_32", avatarSecondary: "_avatar-secondary_106yh_32", "avatar-tertiary": "_avatar-tertiary_106yh_37", avatarTertiary: "_avatar-tertiary_106yh_37", "avatar-image": "_avatar-image_106yh_43", avatarImage: "_avatar-image_106yh_43", "avatar-disabled": "_avatar-disabled_106yh_50", avatarDisabled: "_avatar-disabled_106yh_50", "avatar-shape-square": "_avatar-shape-square_106yh_56", avatarShapeSquare: "_avatar-shape-square_106yh_56", "avatar-shape-circle": "_avatar-shape-circle_106yh_60", avatarShapeCircle: "_avatar-shape-circle_106yh_60" }; //#endregion //#region src/components/ui/atoms/Avatar/Avatar.tsx var Avatar = ({ circle = false, iconName, imageUrl, label, variant = "secondary" }) => { const isImage = imageUrl !== void 0; const isIcon = iconName !== void 0; const variantStyles = { disabled: Avatar_module_default.avatarDisabled, primary: Avatar_module_default.avatarPrimary, secondary: Avatar_module_default.avatarSecondary, tertiary: Avatar_module_default.avatarTertiary }; return /* @__PURE__ */ jsx("div", { "aria-label": label, className: cx(Avatar_module_default.avatar, variantStyles[variant], { [Avatar_module_default.avatarShapeCircle]: circle, [Avatar_module_default.avatarShapeSquare]: !circle, [Avatar_module_default.avatarImage]: isImage }), style: { backgroundImage: isImage ? `url(${imageUrl})` : "unset" }, role: "img", children: isIcon ? /* @__PURE__ */ jsx(Icon, { name: iconName }) : /* @__PURE__ */ jsx("span", { className: Avatar_module_default.avatarLabel, children: label }) }); }; //#endregion export { Avatar as t };