0.1.7 • Published 1 year ago

very-simple-table-lib v0.1.7

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Getting Started with very simple table lib

This project was bootstrapped with Create React App.

How to install

In your project directory type the following commande

 npm install very-simple-table-lib

Features

How to use

import Table from 'very-simple-table-lib/dist/components/Table'

then you need to pass data in JSON format and an object containing what data to display and the corresponding thead in this fashion

const yourJSON = {people:[
    {
        "firstName": "me",
        "lastName": "you",
        "dateOfBirth": "tommorow",
        "country": "international waters"
    },
    ....
]}

now you choose what data you want to display on the table and in what order

const keys = {country: "Country column", firstName: "First name column"}

return <Table data={yourJSON} keys={dataToShow}/>

output:

Country columnFirst name column
international watersme
......

Github

Code available at Github