@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.33 kB
JavaScript
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] = "4d319c5d-2bfb-476b-bad7-f0ba7806eeb4", e._sentryDebugIdIdentifier = "sentry-dbid-4d319c5d-2bfb-476b-bad7-f0ba7806eeb4");
} catch (e) {}
import cx from "classnames";
import { jsx, jsxs } from "preact/jsx-runtime";
import { toChildArray } from "preact";
var List_module_default = {
list: "adyen-kyc-list",
"list-header": "adyen-kyc-list-header",
listHeader: "adyen-kyc-list-header",
"list-footer": "adyen-kyc-list-footer",
listFooter: "adyen-kyc-list-footer",
"list-items": "adyen-kyc-list-items",
listItems: "adyen-kyc-list-items",
"list-items-plain": "adyen-kyc-list-items-plain",
listItemsPlain: "adyen-kyc-list-items-plain",
"list-items-grouped-primary": "adyen-kyc-list-items-grouped-primary",
listItemsGroupedPrimary: "adyen-kyc-list-items-grouped-primary",
"list-items-grouped-secondary": "adyen-kyc-list-items-grouped-secondary",
listItemsGroupedSecondary: "adyen-kyc-list-items-grouped-secondary",
"list-items-padding-none": "adyen-kyc-list-items-padding-none",
listItemsPaddingNone: "adyen-kyc-list-items-padding-none",
"list-items-padding-small": "adyen-kyc-list-items-padding-small",
listItemsPaddingSmall: "adyen-kyc-list-items-padding-small",
"list-items-padding-medium": "adyen-kyc-list-items-padding-medium",
listItemsPaddingMedium: "adyen-kyc-list-items-padding-medium",
"list-items-padding-large": "adyen-kyc-list-items-padding-large",
listItemsPaddingLarge: "adyen-kyc-list-items-padding-large",
"list-item-row-separator": "adyen-kyc-list-item-row-separator",
listItemRowSeparator: "adyen-kyc-list-item-row-separator"
};
//#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 };