@transkripid/flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS - Transkrip.id fork
40 lines (39 loc) • 2.02 kB
JavaScript
import { jsx as m, jsxs as u } from "react/jsx-runtime";
import { c as v } from "react/compiler-runtime";
import { twMerge as w } from "tailwind-merge";
import { mergeDeep as j } from "../../helpers/merge-deep.mjs";
import { getTheme as B } from "../../theme-store/index.mjs";
const T = (z) => {
const e = v(28);
let t, r, l, s, c, a, n, i;
e[0] !== z ? ({
children: r,
color: a,
href: s,
icon: t,
size: n,
className: l,
theme: i,
...c
} = z, e[0] = z, e[1] = t, e[2] = r, e[3] = l, e[4] = s, e[5] = c, e[6] = a, e[7] = n, e[8] = i) : (t = e[1], r = e[2], l = e[3], s = e[4], c = e[5], a = e[6], n = e[7], i = e[8]);
const N = a === void 0 ? "info" : a, f = n === void 0 ? "xs" : n;
let d;
e[9] !== i ? (d = i === void 0 ? {} : i, e[9] = i, e[10] = d) : d = e[10];
const x = d;
let h;
e[11] !== x ? (h = j(B().badge, x), e[11] = x, e[12] = h) : h = e[12];
const o = h;
let p;
e[13] !== t || e[14] !== r || e[15] !== l || e[16] !== N || e[17] !== c || e[18] !== f || e[19] !== o.icon || e[20] !== o.root.base || e[21] !== o.root.color || e[22] !== o.root.size ? (p = () => /* @__PURE__ */ u("span", { className: w(o.root.base, o.root.color[N], o.root.size[f], o.icon[t ? "on" : "off"], l), "data-testid": "flowbite-badge", ...c, children: [
t && /* @__PURE__ */ m(t, { "aria-hidden": !0, className: o.icon.size[f], "data-testid": "flowbite-badge-icon" }),
r && /* @__PURE__ */ m("span", { children: r })
] }), e[13] = t, e[14] = r, e[15] = l, e[16] = N, e[17] = c, e[18] = f, e[19] = o.icon, e[20] = o.root.base, e[21] = o.root.color, e[22] = o.root.size, e[23] = p) : p = e[23];
const b = p;
let g;
return e[24] !== b || e[25] !== s || e[26] !== o.root.href ? (g = s ? /* @__PURE__ */ m("a", { className: o.root.href, href: s, children: /* @__PURE__ */ m(b, {}) }) : /* @__PURE__ */ m(b, {}), e[24] = b, e[25] = s, e[26] = o.root.href, e[27] = g) : g = e[27], g;
};
T.displayName = "Badge";
export {
T as Badge
};
//# sourceMappingURL=Badge.mjs.map