UNPKG

@payfit/unity-components

Version:

27 lines (26 loc) 1.29 kB
import { useBreakpointListener as e } from "../../../hooks/use-breakpoint-listener.js"; import { Button as t } from "../../button/Button.js"; import { DialogButton as n } from "../../dialog/parts/DialogActions/DialogButton.js"; import { Children as r, cloneElement as i, forwardRef as a, isValidElement as o } from "react"; import { uyTv as s } from "@payfit/unity-themes"; import { jsx as c } from "react/jsx-runtime"; //#region src/components/side-panel/parts/SidePanelFooter.tsx var l = s({ base: [ "uy:py-200 uy:px-300 uy:w-full", "uy:flex uy:items-center uy:justify-end uy:gap-100 uy:shrink-0 uy:flex-col uy:md:flex-row", "uy:bg-surface-neutral uy:rounded-bl-200 uy:rounded-br-200 uy:border-t uy:border-solid uy:border-t-solid uy:border-border-neutral", "uy:sticky uy:bottom-0 uy:z-10", "uy:mt-auto", "uy:pb-[max(env(safe-area-inset-bottom),var(--uy-spacing-200))] uy:md:pb-200" ] }), u = a(({ children: a, ...s }, u) => { let d = e(), f = d === "xs" || d === "sm", p = r.map(a, (e) => o(e) && (e.type === t || e.type === n) ? i(e, { size: f ? "full" : e.props.size }) : e); return /* @__PURE__ */ c("footer", { ref: u, className: l(), ...s, children: p }); }); u.displayName = "SidePanelFooter"; //#endregion export { u as SidePanelFooter, l as sidePanelFooter };