UNPKG

welcome-ui

Version:

Customizable design system with react, typescript, tailwindcss and ariakit.

36 lines (35 loc) 1.16 kB
"use client"; import './Badge.css'; import { jsx as r } from "react/jsx-runtime"; import { forwardRef as g } from "react"; import { Text as d } from "./Text.js"; import { c as b } from "./index-B6iGEm-i.js"; const f = "_root_ex7gf_2", v = { root: f, "size-lg": "_size-lg_ex7gf_18", "size-md": "_size-md_ex7gf_25", "size-sm": "_size-sm_ex7gf_32", "variant-brand": "_variant-brand_ex7gf_37", "variant-neutral": "_variant-neutral_ex7gf_41", "variant-warm": "_variant-warm_ex7gf_45", "variant-blue": "_variant-blue_ex7gf_49", "variant-red": "_variant-red_ex7gf_53" }, x = b(v), c = g( ({ children: a, className: t, size: e = "md", variant: s = "warm", withNumberAbbreviation: i, ...n }, o) => { const _ = Number.isInteger(a) && i && a > 99 ? "99+" : a, m = e === "lg" ? "label-md-strong" : "label-sm-strong", l = e === "sm"; return /* @__PURE__ */ r( "div", { ...n, className: x("root", `variant-${s}`, `size-${e}`, t), ref: o, children: !l && /* @__PURE__ */ r(d, { variant: m, children: _ }) } ); } ); c.displayName = "Badge"; export { c as Badge, v as badgeClasses };