0.1.4 • Published 4 years ago

react-simpl-table v0.1.4

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

React Simpl Table

A simple table component for React.js with Typescript support

npm install react-simpl-table

Usage

import Table, { TableColumn } from 'react-simpl-table';

type DataType = {
  key: string;
  description: description;
};

const data: DataType[] = [
  {
    key: 'item1',
    description: 'this is a description for item one',
  },
  {
    key: 'item2',
    description: 'this is a description for item two',
  },
];

const App: React.FC = () => (
  <Table<DataType> data={data} keyExtractor={item => item.key}>
    <TableColumn name="key">Key</TableColumn>
    <TableColumn name="description">Description</TableColumn>
  </Table>
);

More examples in https://cleiton-d.github.io/React-Simpl-Table

By Cleiton Dione Ahnerth Kiper: LinkedIn