UNPKG

@frontify/fondue

Version:
57 lines (56 loc) 1.6 kB
import { jsx as o } from "react/jsx-runtime"; import u from "../../foundation/Icon/Generated/IconCheckMark.es.js"; import { merge as m } from "../../utilities/merge.es.js"; import { Button as a } from "../Button/Button.es.js"; import { ButtonSize as p, ButtonEmphasis as r, ButtonStyle as l } from "../Button/ButtonTypes.es.js"; const i = ({ buttons: t, border: e = !0 }) => /* @__PURE__ */ o( "div", { className: m([ "tw-flex tw-gap-x-3 tw-rounded-b tw-justify-end tw-py-5 tw-px-8 tw-bg-base", e && "tw-border-t tw-border-line", // The footer min-height should be 76px, since we Tailwind doesn't have a tw-h-19 class // we force TW to create it // The 19 comes from, 10 from the tw-py-5 + 9 from button height tw-h-9 "tw-min-h-[4.75rem]" ]), children: t.map((n, s) => /* @__PURE__ */ o(a, { ...n, size: p.Medium }, `flyout-footer-button-${s}`)) } ); i.displayName = "FondueFlyoutFooter"; const c = ({ onConfirm: t, onCancel: e }) => /* @__PURE__ */ o( i, { buttons: t ? [ { style: l.Default, emphasis: r.Default, children: "Cancel", onClick: e }, { style: l.Default, emphasis: r.Strong, children: "Confirm", onClick: t, icon: /* @__PURE__ */ o(u, {}) } ] : [ { style: l.Default, emphasis: r.Default, children: "Close", onClick: e } ] } ); c.displayName = "FondueLegacyFlyoutFooter"; export { i as FlyoutFooter, c as LegacyFlyoutFooter }; //# sourceMappingURL=FlyoutFooter.es.js.map