1.0.0 • Published 2 years ago
rnctable v1.0.0
��# rnctable
Installation
You can install rnctable via npm or yarn:
npm install rnctable
or
yarn add rnctable
Usage
```javascript
import React from 'react'; import { View } from 'react-native'; import RNCTable from 'rnctable';
const MyComponent = () => { return ( <View style={{ flex: 1 }}> <RNCTable datasource={[]} // Data Array which should be rendered in the Table loading={false} // If false, it will show loading cols={[]} // Array defining the columns and data shown in table rows /> ); };
export default MyComponent;
## Props
| Name | Type | Default | Description |
| ------------ | -------------------------------------------------------- | ------- | ----------------------------------------------------------- |
| datasource | `any[]` | `[]` | Data Array which should be rendered in the Table. |
| loading | `boolean` | `false` | If `false`, it will show loading. |
| cols | `Array<{ key: string, label: string, displayField: (row: any) => JSX.Element }>` | `[]` | Array defining the columns and data shown in table rows. |
## Creator
This package was created by [Basit Ahmed](https://basit-ahmed.web.app/).
## License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/BasitAyaz/rnctable/blob/main/LICENSE) file for details.
1.0.0
2 years ago