UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

12 lines (9 loc) 1.2 kB
'use client'; import React from 'react'; import { TableCaption, TableThead, TableTr, TableTh, TableTbody, TableTd, TableTfoot } from './Table.components.mjs'; function TableDataRenderer({ data }) { return /* @__PURE__ */ React.createElement(React.Fragment, null, data.caption && /* @__PURE__ */ React.createElement(TableCaption, null, data.caption), data.head && /* @__PURE__ */ React.createElement(TableThead, null, /* @__PURE__ */ React.createElement(TableTr, null, data.head.map((item, index) => /* @__PURE__ */ React.createElement(TableTh, { key: index }, item)))), data.body && /* @__PURE__ */ React.createElement(TableTbody, null, data.body.map((row, rowIndex) => /* @__PURE__ */ React.createElement(TableTr, { key: rowIndex }, row.map((item, index) => /* @__PURE__ */ React.createElement(TableTd, { key: index }, item))))), data.foot && /* @__PURE__ */ React.createElement(TableTfoot, null, /* @__PURE__ */ React.createElement(TableTr, null, data.foot.map((item, index) => /* @__PURE__ */ React.createElement(TableTh, { key: index }, item))))); } TableDataRenderer.displayName = "@mantine/core/TableDataRenderer"; export { TableDataRenderer }; //# sourceMappingURL=TableDataRenderer.mjs.map