1.0.3 • Published 4 years ago
grid-table1 v1.0.3
Custom react table based on typescript, grid and flex.
Install
npm install grid-table
yarn add grid-table
Documentation
Will be soon...
Basic usage
import { Table } from 'grid-table';
import { ColumnProps } from 'grid-table/ITable';
// just example
interface YourDataProps {
status?: string;
id?: string;
}
const columns: ColumnProps<YourDataProps>[] = [
{
title: 'First title', // title for head
key: 'title1', // column key
dataIndex: 'data1' // index for data-matching
},
{
title: 'Second title',
key: 'title2',
dataIndex: 'data2'
},
];
const data = getData(); // data from any API
const App = () => (
<Table columns={columns} data={data} />
);
TypeScript
grid-table
is written in TypeScript with complete definitions.
You can use it with both, typescript or javascript.
Contributing
Please refer to each project's style and contribution guidelines for submitting patches and additions. In general, we follow the "fork-and-pull"
Git workflow.
- Fork the repo on GitHub
- Clone the project to your own machine
- Start the project using
npm run start
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull request so that we can review your changes
NOTE: Be sure to merge the latest from "upstream" before making a pull request!