UNPKG

@transkripid/flowbite-react

Version:

Official React components built for Flowbite and Tailwind CSS - Transkrip.id fork

37 lines (36 loc) 1.42 kB
import { jsx as T } from "react/jsx-runtime"; import { c as u } from "react/compiler-runtime"; import { twMerge as v } from "tailwind-merge"; import { mergeDeep as x } from "../../helpers/merge-deep.mjs"; import { useSidebarContext as N } from "./SidebarContext.mjs"; const S = (n) => { const e = u(22); let o, r, s, a, t; e[0] !== n ? ({ children: o, color: a, className: r, theme: t, ...s } = n, e[0] = n, e[1] = o, e[2] = r, e[3] = s, e[4] = a, e[5] = t) : (o = e[1], r = e[2], s = e[3], a = e[4], t = e[5]); const p = a === void 0 ? "info" : a; let c; e[6] !== t ? (c = t === void 0 ? {} : t, e[6] = t, e[7] = c) : c = e[7]; const f = c, { theme: h, isCollapsed: b } = N(); let l, i, m; if (e[8] !== r || e[9] !== p || e[10] !== f || e[11] !== b || e[12] !== h.cta) { const C = x(h.cta, f); l = "sidebar-cta", i = b, m = v(C.base, C.color[p], r), e[8] = r, e[9] = p, e[10] = f, e[11] = b, e[12] = h.cta, e[13] = l, e[14] = i, e[15] = m; } else l = e[13], i = e[14], m = e[15]; let d; return e[16] !== o || e[17] !== s || e[18] !== l || e[19] !== i || e[20] !== m ? (d = /* @__PURE__ */ T("div", { "data-testid": l, hidden: i, className: m, ...s, children: o }), e[16] = o, e[17] = s, e[18] = l, e[19] = i, e[20] = m, e[21] = d) : d = e[21], d; }; S.displayName = "Sidebar.CTA"; export { S as SidebarCTA }; //# sourceMappingURL=SidebarCTA.mjs.map