0.1.2 • Published 3 years ago

rjs-tables v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

About

rjs-tables is a table solution for react web apps.

Getting Started

Install the pacakage :

NPM:

npm i rjs-tables

Yarn:

yarn add rjs-tables

Import in your project

import Table from 'rjs-tables/Table'

Use in your project

<Table
     tableHeader={header}
     tableData={data}
     />

Props

PropsDetailsExample
tableHeadertakes an array of strings["Item1","Item2","Item3"]
tableDatatakes an array of object, each object will map to a row in the table{"Item1":"This item 1","Item2":"This item 2","Item3":"This item 3"}
paginationshows pagination, takes an boolean valuetrue or false
tableContainerStylestyle object for container{display:'flex',flexDirection:'column',width:'100%',justifyContent:'center',alignItems:'center',margin:10,color:'magenta'}
tableStylestyle object for table{width:300,margin:10,border:'2px solid orange'}
tableHeaderStylestyle object for table header{color:'red',border:'3px solid magenta',background:'lightpink'}
tableBodyStylestyle object for table body{color:'green',border:'3px solid blue',background:'lightblue'}

Examples