@cc-test2/datatable
v2.0.14
Published
Made with create-react-library
Downloads
3
Readme
datatable
Made with create-react-library
Install
npm install --save @cc-test2/datatable
Usage
import React, { Component } from 'react'
import Table from "@cc-test2/datatable";
const ExampleComponent = () => {
const list = [
{
_id: '1',
name: 'userName1',
lastName: 'userLastName1',
address: 'Maracaibo',
age: '26',
occupation: 'Developer',
color: 'green'
},
{
_id: '2',
name: 'userName2',
lastName: 'userLastName2',
address: 'Maracaibo',
age: '29',
occupation: 'Developer'
},
{
_id: '3',
name: 'userName3',
lastName: 'userLastName3',
address: 'Maracaibo',
age: '18',
occupation: 'Designer'
color: 'blue'
},
{
_id: '4',
name: 'userName4',
lastName: 'userLastName4',
address: 'Maracaibo',
age: '22',
occupation: 'Developer'
},
{
_id: '5',
name: 'userName5',
lastName: 'userLastName5',
address: 'Maracaibo',
age: '33',
occupation: 'Developer'
}
];
const head = [
'name',
{field:'lastName', label:'Apellido'},
'address',
{field:'age', label:'Edad'},
'color',
'occupation',
];
return (
<Table
list={list}
head={head}
/>
))
}
License
MIT © CodeCraft