UNPKG

@adyen/adyen-platform-experience-web

Version:

![Platform Experience header](https://github.com/Adyen/adyen-platform-experience-web/assets/7926613/18094965-9e01-450e-8dc9-ea84e6b22c2b)

36 lines (35 loc) 1.56 kB
import { jsx as Y } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js"; import { DEFAULT_TYPOGRAPHY_CLASSNAME as o } from "./constants.js"; import f from "classnames"; import { useMemo as R } from "../../../external/preact/hooks/dist/hooks.module.js"; import { TypographyVariant as T, TypographyModifier as E } from "./types.js"; import { memo as y } from "../../../external/preact/compat/dist/compat.module.js"; /* empty css */ function C({ el: B, className: D, stronger: I, strongest: L, variant: $, medium: O, large: p, testId: N, wide: m, children: A }) { const S = B || "p", s = R( () => ({ // Caption [`${o}--${T.CAPTION}`]: $ === T.CAPTION, [`${o}--${T.CAPTION}-${E.WIDE}`]: $ === T.CAPTION && m, [`${o}--${T.CAPTION}-${E.STRONGER}`]: $ === T.CAPTION && I, // Body [`${o}--${T.BODY}`]: $ === T.BODY, [`${o}--${T.BODY}-${E.WIDE}`]: $ === T.BODY && m, [`${o}--${T.BODY}-${E.STRONGER}`]: $ === T.BODY && I, [`${o}--${T.BODY}-${E.STRONGEST}`]: $ === T.BODY && L, // Subtitle [`${o}--${T.SUBTITLE}`]: $ === T.SUBTITLE, [`${o}--${T.SUBTITLE}-${E.STRONGER}`]: $ === T.SUBTITLE && I, // Title [`${o}--${T.TITLE}`]: $ === T.TITLE && !O && !p, [`${o}--${T.TITLE}-${E.MEDIUM}`]: $ === T.TITLE && O, [`${o}--${T.TITLE}-${E.LARGE}`]: $ === T.TITLE && p }), [$, m, I, O, p, L] ); return /* @__PURE__ */ Y(S, { className: f([`${o}`, s, D]), "data-testid": N, children: A }); } const x = y(C); export { x as default };