UNPKG

@coligo/react-native-table

Version:

Lightweight package for creating flexible tables in React Native.

29 lines (28 loc) 800 B
"use strict"; import { StyleSheet, View } from 'react-native'; import { TableCell } from "./TableCell.js"; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; export const TableRow = ({ item, columns, cellPadding, borderStyle, rowHeader, rowFooter }) => /*#__PURE__*/_jsxs(View, { children: [rowHeader ? rowHeader(item) : null, /*#__PURE__*/_jsx(View, { style: styles.row, children: columns.map((column, index) => /*#__PURE__*/_jsx(TableCell, { column: column, item: item, cellPadding: cellPadding, borderStyle: index !== columns.length - 1 ? borderStyle : undefined }, index)) }), rowFooter ? rowFooter(item) : null] }); const styles = StyleSheet.create({ row: { flexDirection: 'row' } }); //# sourceMappingURL=TableRow.js.map