1.0.1 • Published 6 years ago

npm-pb-items-table v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

npm-pb-items-table

Simple table to draw data from array.

NPM JavaScript Style Guide

Install

npm install --save npm-pb-items-table

Features

  • Can handle objects with any length.
  • Configurable background color.
  • Ability to add new rows.
  • Ability to remove rows.
  • Ability to edit data in cells.
  • Configurable headers.
  • Ability to handle custom Events.

Example

Example with "server" emulation ▸

Basic Usage

Just send data inside
import React, { Component } from 'react'

import ItemsTable from 'npm-pb-items-table'
const Data = {[
                { name: 'Jack', age: 28, address: 'some where', id:1 },
                { name: 'Rose', age: 36, address: 'some where', id:2 },
              ];}
const Headers = ['Name',  'age', 'address', 'anyname', 'id'];
class Example extends Component {
  render () {
    return (
      <ItemsTaable data={Data} headers={Headers} />
    )
  }
}

Api

Props

License

MIT © dmitry-skrypka