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.

72 lines (71 loc) 3.32 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] = "37796cf2-e63b-4fbf-841f-583e4384d526", e._sentryDebugIdIdentifier = "sentry-dbid-37796cf2-e63b-4fbf-841f-583e4384d526"); } catch (e) {} import cx from "classnames"; import { jsx, jsxs } from "preact/jsx-runtime"; import { toChildArray } from "preact"; var List_module_default = { list: "_list_s1vme_1", "list-header": "_list-header_s1vme_8", listHeader: "_list-header_s1vme_8", "list-footer": "_list-footer_s1vme_15", listFooter: "_list-footer_s1vme_15", "list-items": "_list-items_s1vme_22", listItems: "_list-items_s1vme_22", "list-items-plain": "_list-items-plain_s1vme_27", listItemsPlain: "_list-items-plain_s1vme_27", "list-items-grouped-primary": "_list-items-grouped-primary_s1vme_31", listItemsGroupedPrimary: "_list-items-grouped-primary_s1vme_31", "list-items-grouped-secondary": "_list-items-grouped-secondary_s1vme_37", listItemsGroupedSecondary: "_list-items-grouped-secondary_s1vme_37", "list-items-padding-none": "_list-items-padding-none_s1vme_42", listItemsPaddingNone: "_list-items-padding-none_s1vme_42", "list-items-padding-small": "_list-items-padding-small_s1vme_46", listItemsPaddingSmall: "_list-items-padding-small_s1vme_46", "list-items-padding-medium": "_list-items-padding-medium_s1vme_50", listItemsPaddingMedium: "_list-items-padding-medium_s1vme_50", "list-items-padding-large": "_list-items-padding-large_s1vme_54", listItemsPaddingLarge: "_list-items-padding-large_s1vme_54", "list-item-row-separator": "_list-item-row-separator_s1vme_58", listItemRowSeparator: "_list-item-row-separator_s1vme_58" }; //#endregion //#region src/components/ui/atoms/List/List.tsx var List = ({ children, dividers = true, footer, header, padding = "medium", variant = "plain" }) => { const childrenArray = toChildArray(children); const listVariantStyles = { plain: List_module_default.listItemsPlain, "grouped-primary": List_module_default.listItemsGroupedPrimary, "grouped-secondary": List_module_default.listItemsGroupedSecondary }; const listClassName = cx(List_module_default.listItems, listVariantStyles[variant], variant !== "plain" && { [List_module_default.listItemsPaddingSmall]: padding === "small", [List_module_default.listItemsPaddingMedium]: padding === "medium", [List_module_default.listItemsPaddingLarge]: padding === "large" }, { [List_module_default.listItemsPaddingNone]: padding === "none" }); return /* @__PURE__ */ jsxs("div", { className: List_module_default.list, children: [ header && /* @__PURE__ */ jsx("div", { className: List_module_default.listHeader, children: header }), /* @__PURE__ */ jsx("ul", { className: listClassName, children: childrenArray.map((item) => { return /* @__PURE__ */ jsx("li", { className: cx(List_module_default.listItem, { [List_module_default.listItemRowSeparator]: dividers }), children: item }); }) }), footer && /* @__PURE__ */ jsx("div", { className: List_module_default.listFooter, children: footer }) ] }); }; //#endregion export { List as t };