UNPKG

@teamsparta/stack-custom-modal

Version:
27 lines (23 loc) 999 B
"use client"; import { closeButtonCss } from "./chunk-YJGPPUJG.mjs"; import { __objRest, __spreadProps, __spreadValues } from "./chunk-FUJQIYOF.mjs"; // src/compounds/CustomModalCloseButton.tsx import * as Dialog from "@radix-ui/react-dialog"; import { NavigationClose } from "@teamsparta/stack-icons"; import { vars } from "@teamsparta/stack-tokens"; import { forwardRef } from "react"; import { jsx } from "@emotion/react/jsx-runtime"; var CustomModalCloseButton = forwardRef((_a, ref) => { var _b = _a, { asChild = true } = _b, restProps = __objRest(_b, ["asChild"]); return /* @__PURE__ */ jsx(Dialog.Close, __spreadProps(__spreadValues({ ref, asChild }, restProps), { children: /* @__PURE__ */ jsx("button", { type: "button", css: closeButtonCss, "aria-label": "\uB2EB\uAE30", children: /* @__PURE__ */ jsx(NavigationClose, { size: 16, color: vars.icon.quaternary }) }) })); }); CustomModalCloseButton.displayName = "CustomModalCloseButton"; export { CustomModalCloseButton };