@teamsparta/stack-custom-modal
Version:
stack custom modal
40 lines (36 loc) • 990 B
JavaScript
"use client";
import {
titleCss
} from "./chunk-YJGPPUJG.mjs";
import {
__objRest,
__spreadProps,
__spreadValues
} from "./chunk-FUJQIYOF.mjs";
// src/compounds/CustomModalTitle.tsx
import * as Dialog from "@radix-ui/react-dialog";
import { Text } from "@teamsparta/stack-text";
import { vars } from "@teamsparta/stack-tokens";
import { forwardRef } from "react";
import { jsx } from "@emotion/react/jsx-runtime";
var CustomModalTitle = forwardRef(
(_a, ref) => {
var _b = _a, { children, font = "subTitle1", color = vars.text.primary } = _b, restProps = __objRest(_b, ["children", "font", "color"]);
return /* @__PURE__ */ jsx(Dialog.Title, { asChild: true, children: /* @__PURE__ */ jsx(
Text,
__spreadProps(__spreadValues({
ref,
as: "h2",
font,
color,
css: titleCss
}, restProps), {
children
})
) });
}
);
CustomModalTitle.displayName = "CustomModalTitle";
export {
CustomModalTitle
};