1.0.1 • Published 1 year ago

tablets v1.0.1

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

TableTS

A simple React component for displaying tabular data.

Install

npm install @arnaud.derison/TableTS

Usage

import React from 'react';
import Table from '@arnaud.derison/TableTS';

function Delete(){
  const handleClick = ()=>{
    console.log("click");
  }

  return (
    <Button onClick={()=>handleClick()}>Delete</Button>
    );
}

const title = ['Name', 'Age', 'City'];
const data = [
  ['John Doe', 'New York', <Delete />],
  ['Jane Smith', 'London', <Delete />],
  ['Bob Johnson', 'Paris', <Delete />],
];

function MyComponent() {
  return (
    <Table title={title} data={data} />
  );
}
1.0.1

1 year ago

1.0.0

1 year ago