UNPKG

@payfit/unity-components

Version:

28 lines (27 loc) • 810 B
import { useCardContext as e } from "../Card.context.js"; import { forwardRef as t } from "react"; import { uyTv as n } from "@payfit/unity-themes"; import { jsx as r } from "react/jsx-runtime"; import { Heading as i } from "react-aria-components/Heading"; //#region src/core/components/card/parts/CardTitle.tsx var a = n({ base: ["uy:typography-h3 uy:text-content-neutral uy:leading-none"], variants: { isHidden: { true: "uy:sr-only", false: "" } }, defaultVariants: { isHidden: !1 } }), o = t(({ children: t, level: n = 3, isHidden: o = !1 }, s) => { let { titleId: c } = e(); return /* @__PURE__ */ r(i, { ref: s, level: n, id: c, className: a({ isHidden: o }), "data-unity-slot": "card.title", children: t }); }); o.displayName = "CardTitle"; //#endregion export { o as CardTitle };