1.2.3 • Published 3 years ago
mllt-datatable v1.2.3
mllt-datatable
Datatable component
Dependencies
- yarn or npm,
- react,
- react-dom,
- prop-types
Install
npm install --save mllt-datatable
Usage
import React, { Component } from 'react'
import DataTable from 'mllt-datatable'
import 'mllt-datatable/dist/index.css'
const labels = [
{ label: 'Name', sortKey: 'name' },
{ label: 'Email', sortKey: 'email' }
]
const data = [
{
'name': 'John',
'email': 'johndoe@email.com'
},
{
'name': 'Mike',
'email': 'mikefritz@email.com'
},
{
'name': 'June',
'email': 'junedaily@email.com'
}
]
class Example extends Component {
render() {
return <DataTable labels={labels} data={data} itemsPerPage={2} />
}
}
Github: clone repo project
git clone https://github.com/Maxime-Moilliet/mllt-datatable
cd ./mllt-database
Launch example project
cd ./mllt-database/example
npm start
Launch test example project
npm test
License
MIT © maxime_mllt