npm.io
1.10.0 • Published 6 years ago

webstaurant-table

Licence
ISC
Version
1.10.0
Deps
2
Size
346 kB
Vulns
0
Weekly
0

WebstaurantTable

WebstaurantTable is a lightweight table component styled with Tailwind.

Install

Use the package manager npm to install webstaurant-table.

npm install webstaurant-table

Features

  • Display structured rows of data associated with a group of defined columns.

Quickstart

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} />
    )
}