UNPKG

@transkripid/flowbite-react

Version:

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

44 lines (43 loc) 2.05 kB
import { jsx as j, jsxs as y } from "react/jsx-runtime"; import { c as A } from "react/compiler-runtime"; import { useId as C } from "react"; import { twMerge as L } from "tailwind-merge"; import { mergeDeep as T } from "../../helpers/merge-deep.mjs"; import { useSidebarContext as D } from "./SidebarContext.mjs"; const I = (N) => { const e = A(34); let l, s, i, m, r, n, o; e[0] !== N ? ({ children: l, className: s, href: i, img: m, imgAlt: n, theme: o, ...r } = N, e[0] = N, e[1] = l, e[2] = s, e[3] = i, e[4] = m, e[5] = r, e[6] = n, e[7] = o) : (l = e[1], s = e[2], i = e[3], m = e[4], r = e[5], n = e[6], o = e[7]); const u = n === void 0 ? "" : n; let p; e[8] !== o ? (p = o === void 0 ? {} : o, e[8] = o, e[9] = p) : p = e[9]; const x = p, b = C(), { theme: w, isCollapsed: v } = D(); let a, c, f, t; e[10] !== s || e[11] !== x || e[12] !== i || e[13] !== b || e[14] !== w.logo ? (t = T(w.logo, x), a = `flowbite-sidebar-logo-${b}`, c = i, f = L(t.base, s), e[10] = s, e[11] = x, e[12] = i, e[13] = b, e[14] = w.logo, e[15] = a, e[16] = c, e[17] = f, e[18] = t) : (a = e[15], c = e[16], f = e[17], t = e[18]); let d; e[19] !== m || e[20] !== u || e[21] !== t.img ? (d = /* @__PURE__ */ j("img", { alt: u, src: m, className: t.img }), e[19] = m, e[20] = u, e[21] = t.img, e[22] = d) : d = e[22]; const S = t.collapsed[v ? "on" : "off"], $ = `flowbite-sidebar-logo-${b}`; let g; e[23] !== l || e[24] !== S || e[25] !== $ ? (g = /* @__PURE__ */ j("span", { className: S, id: $, children: l }), e[23] = l, e[24] = S, e[25] = $, e[26] = g) : g = e[26]; let h; return e[27] !== r || e[28] !== g || e[29] !== a || e[30] !== c || e[31] !== f || e[32] !== d ? (h = /* @__PURE__ */ y("a", { "aria-labelledby": a, href: c, className: f, ...r, children: [ d, g ] }), e[27] = r, e[28] = g, e[29] = a, e[30] = c, e[31] = f, e[32] = d, e[33] = h) : h = e[33], h; }; I.displayName = "Sidebar.Logo"; export { I as SidebarLogo }; //# sourceMappingURL=SidebarLogo.mjs.map