@coligo/react-native-table
Version:
Lightweight package for creating flexible tables in React Native.
30 lines (29 loc) • 837 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TableCell = void 0;
var _reactNative = require("react-native");
var _jsxRuntime = require("react/jsx-runtime");
const TableCell = ({
column,
item,
cellPadding,
borderStyle
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.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__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
children: String(item[column.key])
})
});
exports.TableCell = TableCell;
//# sourceMappingURL=TableCell.js.map