@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
17 lines (16 loc) • 1.23 kB
JavaScript
"use client";
import { TableCaption, TableTbody, TableTd, TableTfoot, TableTh, TableThead, TableTr } from "./Table.components.mjs";
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
//#region packages/@mantine/core/src/components/Table/TableDataRenderer.tsx
function TableDataRenderer({ data }) {
return /* @__PURE__ */ jsxs(Fragment, { children: [
data.caption && /* @__PURE__ */ jsx(TableCaption, { children: data.caption }),
data.head && /* @__PURE__ */ jsx(TableThead, { children: /* @__PURE__ */ jsx(TableTr, { children: data.head.map((item, index) => /* @__PURE__ */ jsx(TableTh, { children: item }, index)) }) }),
data.body && /* @__PURE__ */ jsx(TableTbody, { children: data.body.map((row, rowIndex) => /* @__PURE__ */ jsx(TableTr, { children: row.map((item, index) => /* @__PURE__ */ jsx(TableTd, { children: item }, index)) }, rowIndex)) }),
data.foot && /* @__PURE__ */ jsx(TableTfoot, { children: /* @__PURE__ */ jsx(TableTr, { children: data.foot.map((item, index) => /* @__PURE__ */ jsx(TableTh, { children: item }, index)) }) })
] });
}
TableDataRenderer.displayName = "@mantine/core/TableDataRenderer";
//#endregion
export { TableDataRenderer };
//# sourceMappingURL=TableDataRenderer.mjs.map