@transkripid/flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS - Transkrip.id fork
37 lines (36 loc) • 1.44 kB
JavaScript
import { jsx as T } from "react/jsx-runtime";
import { c as u } from "react/compiler-runtime";
import { forwardRef as v } from "react";
import { twMerge as x } from "tailwind-merge";
import { mergeDeep as N } from "../../helpers/merge-deep.mjs";
import { useTableContext as R } from "./TableContext.mjs";
const g = v((f, c) => {
const e = u(22);
let o, r, l, t;
e[0] !== f ? ({
children: o,
className: r,
theme: t,
...l
} = f, e[0] = f, e[1] = o, e[2] = r, e[3] = l, e[4] = t) : (o = e[1], r = e[2], l = e[3], t = e[4]);
let a;
e[5] !== t ? (a = t === void 0 ? {} : t, e[5] = t, e[6] = a) : a = e[6];
const d = a, {
theme: n,
hoverable: h,
striped: w
} = R();
let m, s, i;
if (e[7] !== r || e[8] !== d || e[9] !== h || e[10] !== c || e[11] !== n.row || e[12] !== w) {
const b = N(n.row, d);
m = c, s = "table-row-element", i = x(b.base, w && b.striped, h && b.hovered, r), e[7] = r, e[8] = d, e[9] = h, e[10] = c, e[11] = n.row, e[12] = w, e[13] = m, e[14] = s, e[15] = i;
} else
m = e[13], s = e[14], i = e[15];
let p;
return e[16] !== o || e[17] !== l || e[18] !== m || e[19] !== s || e[20] !== i ? (p = /* @__PURE__ */ T("tr", { ref: m, "data-testid": s, className: i, ...l, children: o }), e[16] = o, e[17] = l, e[18] = m, e[19] = s, e[20] = i, e[21] = p) : p = e[21], p;
});
g.displayName = "Table.Row";
export {
g as TableRow
};
//# sourceMappingURL=TableRow.mjs.map