@payfit/unity-components
Version:
25 lines (24 loc) • 885 B
JavaScript
import e, { forwardRef as t, memo as n, useMemo as r } from "react";
import { uyTv as i } from "@payfit/unity-themes";
import { jsx as a } from "react/jsx-runtime";
//#region src/components/table/parts/TableHeader.tsx
var o = i({ base: [
"uy:h-500 uy:bg-surface-neutral-low uy:rounded-tl-100 uy:rounded-tr-100 uy:overflow-hidden",
"uy:sticky uy:top-0 uy:z-[1]",
"uy:[&_tr]:border-b uy:[&_tr]:border-solid uy:[&_tr]:border-b-border-neutral-enabled"
] }), s = n(t(({ children: t, ...n }, i) => {
let s = r(() => e.Children.map(t, (t, n) => e.isValidElement(t) ? e.cloneElement(t, {
rowIndex: n,
...t.props
}) : t), [t]);
return /* @__PURE__ */ a("thead", {
ref: i,
className: o(),
"data-dd-privacy": "allow",
...n,
children: /* @__PURE__ */ a("tr", { children: s })
});
}));
s.displayName = "TableHeader";
//#endregion
export { s as TableHeader, o as tableHeader };