WebstaurantTable is a lightweight table component styled with Tailwind.
Use the package manager npm to install webstaurant-table.
npm install webstaurant-table
- Display structured rows of data associated with a group of defined columns.
import React from 'react
import { Table } from 'webstaurant-table'
const App = () => {
const columns = [
{
title: 'Id',
accessor: 'id',
},
{
title: 'Name',
accessor: 'name',
}
]
const data = [
{
id: '1',
name: 'Waldo',
},
{
id: '2',
name: 'Jeremy'
}
]
return (
<Table columns={columns} data={data} />
)
}