simple-table-react
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

Simple Table React

npm Build status codecov Codacy Badge

Demo

How to use

Pass an array of objects (each should contain id) and a list of columns (headers) to DataTable:

<DataTable
  headers={headers}
  data={data}
  actions={Actions}
  handleRowClick={handleClick}
  getCellColor={getCellColor}
  getValue={getCellValue}
/>

DataTable also receives optional functions: handleRowClick, getCellColor and getValue. Component that Actions function returns will be placed at the right of every row.

Styles customisation

Styles can be added to css classses simple-table, simple-table-cell (can be used to style text and border color), simple-table-head and simple-table-row. Note that getCellColor will overwrite text color, so you will need to add !important.

Readme

Keywords

Package Sidebar

Install

npm i simple-table-react

Weekly Downloads

2

Version

0.2.1

License

none

Unpacked Size

21.1 kB

Total Files

22

Last publish

Collaborators

  • shelchkov