UNPKG

@coligo/react-native-table

Version:

Lightweight package for creating flexible tables in React Native.

25 lines (24 loc) 662 B
"use strict"; import { View, Text } from 'react-native'; import { jsx as _jsx } from "react/jsx-runtime"; export const TableCell = ({ column, item, cellPadding, borderStyle }) => /*#__PURE__*/_jsx(View, { style: [column.width ? { width: column.width } : { flex: column.flex ?? 1 }, { ...cellPadding }, borderStyle?.showVertical ? { borderRightWidth: borderStyle.borderWidth ?? 1, borderColor: borderStyle.borderColor ?? 'black' } : undefined], children: column.render ? column.render(item[column.key], item) : /*#__PURE__*/_jsx(Text, { children: String(item[column.key]) }) }); //# sourceMappingURL=TableCell.js.map