react-table-pdf
v0.0.4
Published
customizable pdf table with react and ts
Downloads
413
Maintainers
Readme
customizable pdfTable build on react, ts and @react-pdf/renderer
Note: This Library based on @react-pdf/renderer
How to install
yarn add react-table-pdf
npm i react-table-pdf
🔨 Usage
import { Table, TableRow, TableCell } from "react-table-pdf";
also we provide utils so if you want to build your own Table
import {
excuteFnOrReturnMe,
isThereData,
normalizer,
renderRowStyle,
renderRowKey
} from "react-table-pdf";
Table Props
| Name | Type | Required | | :------------- | :---------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------: | | columns | Array | true | | dataSource | Array | true | | rowKey | string | () => string | true | | style | Style | false | | headerRowStyle | Style | false | | rowStyle | Style | () => Style | false |
TableRow Props
| Name | Type | Required | | :------- | :---------------------------------------------------------------------------------------------------------: | :------: | | children | Array | true | | isHeader | boolean | false | | style | Style | false |
TableCell Props
| Name | Type | Required | | :------- | :---------------------------------------------------------------------------------------------------------: | :------: | | children | text | true | | noBorder | boolean | false | | style | Style | false |