UNPKG

@payfit/unity-components

Version:

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