UNPKG

@trail-ui/react

Version:
28 lines (25 loc) 699 B
import { InternalModalContext } from "./chunk-66DN4CGG.mjs"; // src/modal/modal-header.tsx import { clsx } from "@trail-ui/shared-utils"; import { useContext } from "react"; import { Heading } from "react-aria-components"; import { jsx } from "react/jsx-runtime"; function ModalHeader(props) { const { children, className, ...otherProps } = props; const { slots, classNames } = useContext(InternalModalContext); return /* @__PURE__ */ jsx( Heading, { id: "modal-header", slot: "title", className: slots.header({ class: clsx(classNames == null ? void 0 : classNames.header, className) }), ...otherProps, children } ); } export { ModalHeader };