@cimpress/react-components
Version:
React components to support the MCP styleguide
12 lines • 792 B
JavaScript
;
/* eslint-disable react/no-array-index-key */
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TableBody = void 0;
const react_1 = __importDefault(require("react"));
const TableCell_1 = require("./TableCell");
const TableBody = ({ data, columns }) => (react_1.default.createElement(react_1.default.Fragment, null, data.map((row, i) => (react_1.default.createElement("tr", { key: `row-${row.id}-${i}` }, columns.map(c => (react_1.default.createElement(TableCell_1.TableCell, { key: `cell-${row.id}-${i}-${c.accessor}`, column: c, row: row }))))))));
exports.TableBody = TableBody;
//# sourceMappingURL=TableBody.js.map