UNPKG

@frontify/fondue

Version:
55 lines (54 loc) 1.36 kB
import { jsx as g } from "react/jsx-runtime"; import { merge as l } from "../../utilities/merge.es.js"; import { decorationMap as m, wordBreakMap as s, whitespaceMap as p, overflowMap as c, displayMap as f } from "../shared/records.es.js"; const u = { default: "tw-font-medium", strong: "tw-font-bold" }, h = { medium: "tw-text-heading-medium", large: "tw-text-heading-large", "x-large": "tw-text-heading-x-large", "xx-large": "tw-text-heading-xx-large" }, M = { default: "tw-text-text", weak: "tw-text-text-weak", "x-weak": "tw-text-text-x-weak", disabled: "tw-text-text-disabled", negative: "tw-text-text-negative", positive: "tw-text-text-positive", warning: "tw-text-text-warning", interactive: "tw-text-text-interactive" }, v = ({ children: a, as: i = "span", weight: n = "default", size: x = "medium", color: d = "default", overflow: t = "visible", decoration: o = "none", wordBreak: r = "normal", whitespace: w = "normal", display: e }) => /* @__PURE__ */ g( i, { "data-test-id": "heading", className: l([ "tw-font-heading tw-max-w-full", u[n], h[x], M[d], m[o], s[r], t !== "truncate" && p[w], c[t], e && f[e] ]), children: a } ); v.displayName = "FondueHeading"; export { v as Heading }; //# sourceMappingURL=Heading.es.js.map