1.0.3 • Published 4 years ago

grid-table1 v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

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.

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Start the project using npm run start
  4. Commit changes to your own branch
  5. Push your work back up to your fork
  6. 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!

1.0.3

4 years ago

1.0.2

4 years ago