UNPKG

@konstructio/ui

Version:

A set of reusable and customizable React components built for konstruct.io

32 lines (31 loc) 654 B
import { jsx as c } from "react/jsx-runtime"; import { useId as d } from "react"; import { typographyVariants as f } from "./Typography.variants.js"; import { useTheme as n } from "../../contexts/theme.hook.js"; const u = ({ className: e, theme: m, children: p, variant: o, component: s, ...t }) => { const r = d(), { theme: h } = n(), y = s ?? (o != null && o.includes("h") ? o : "p"); return /* @__PURE__ */ c( y, { id: r, className: f({ className: e, theme: m ?? h, variant: o }), ...t, children: p } ); }; u.displayName = "Typography"; export { u as Typography };