@konstructio/ui
Version:
A set of reusable and customizable React components built for konstruct.io
29 lines (28 loc) • 662 B
JavaScript
import { jsx as y } from "react/jsx-runtime";
import { forwardRef as f } from "react";
import { cn as n } from "../../utils/index.js";
import { typographyVariants as c } from "./Typography.variants.js";
const h = f(
({ className: r, theme: p, children: m, variant: o, component: t, ...e }, a) => {
const s = t ?? (o?.includes("h") ? o : "p");
return /* @__PURE__ */ y(
s,
{
ref: a,
"data-theme": p,
className: n(
c({
className: r,
variant: o
})
),
...e,
children: m
}
);
}
);
h.displayName = "Typography";
export {
h as Typography
};