material-ui-table

0.1.2 • Public • Published

material-ui-table

Installation

material-ui-table is available as an npm package.

npm i material-ui-table

Usage

import React from 'react';
import Table from 'material-ui-table';
 
export default class MyAwesomeReactComponent extends React.Component  {
  constructor(props) {
    super(props);
  }
  render(){
    let columns=[
      {key:'id',label:'ID'},
      {key:'title',label:'Title'},
      {key:'link',label:'Link'},
    ];
    let data=[{
      id:1,
      title:'React',
      link:<a href="https://github.com/facebook/react">React</a>,
      _selected:true, //Table Row Props
      _striped:false
    },{
      id:2,
      title:'Material UI',
      link:<a href="https://github.com/callemall/material-ui"/>Material UI</a>
    }];
    return (
      <Table
        columns={columns}
        data={data}
      />
    )
  }
}

Props

header object Table Header Props

body object Table Body Props

title string

footer string

columns array

data array

...others Table Props

Contribute

License

This project is licensed under the terms of the MIT license

Readme

Keywords

Package Sidebar

Install

npm i material-ui-table

Weekly Downloads

72

Version

0.1.2

License

MIT

Last publish

Collaborators

  • liangxingchen