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)

51 lines (50 loc) 1.41 kB
import { jsx as s } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js"; import { CARD_BASE_CLASS as h, CARD_FILLED as o, CARD_NO_OUTLINE as I, CARD_NO_PADDING as L, CARD_HEADER as p, CARD_HEADER_CONTENT as n, CARD_TITLE as d, CARD_SUBTITLE as f, CARD_BODY as t, CARD_BODY_WITH_TITLE as B, CARD_FOOTER as S } from "./constants.js"; import m from "classnames"; /* empty css */ const Y = ({ title: D, subTitle: _, children: C, footer: A, el: R, renderHeader: a, renderFooter: c, filled: N, noOutline: E, noPadding: i, classNameModifiers: T, testId: l }) => { const O = R || "header"; return /* @__PURE__ */ s( "section", { className: m( h, { [o]: N, [I]: E, [L]: i }, T ), "data-testid": l, children: [ (D || a) && /* @__PURE__ */ s(O, { className: p, children: (D || a) && /* @__PURE__ */ s("div", { className: n, children: [ a || /* @__PURE__ */ s("span", { className: d, children: D }), _ && /* @__PURE__ */ s("div", { className: f, children: _ }) ] }) }), /* @__PURE__ */ s( "div", { className: m(t, { [B]: D || a }), children: C } ), (A || c) && /* @__PURE__ */ s("footer", { className: S, children: c || A }) ] } ); }; export { Y as default };