UNPKG

@teamsparta/stack-custom-modal

Version:
56 lines (52 loc) 1.17 kB
"use client"; import { useCustomModal } from "./chunk-VHPHVMAP.mjs"; import { footerHasScrollCss } from "./chunk-YJGPPUJG.mjs"; import { __objRest, __spreadProps, __spreadValues } from "./chunk-FUJQIYOF.mjs"; // src/compounds/CustomModalFooter.tsx import { Flex } from "@teamsparta/stack-flex"; import { forwardRef } from "react"; import { jsx } from "@emotion/react/jsx-runtime"; var CustomModalFooter = forwardRef( (_a, ref) => { var _b = _a, { children, direction = "column", padding = "16px 32px 32px 32px", align = "start", justify = "start" } = _b, restProps = __objRest(_b, [ "children", "direction", "padding", "align", "justify" ]); const { hasScroll } = useCustomModal("CustomModalFooter"); return /* @__PURE__ */ jsx( Flex, __spreadProps(__spreadValues({ ref, as: "footer", direction, padding, css: [hasScroll && footerHasScrollCss], align, justify }, restProps), { children }) ); } ); CustomModalFooter.displayName = "CustomModalFooter"; export { CustomModalFooter };