0.2.2 • Published 5 years ago

@shubich/react-table v0.2.2

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

@shubich/react-table

React component for rendering lists to html table

NPM registry

Install

# NPM
npm install @shubich/react-table

Usage

Input

import * as React from "react";
import { render } from "react-dom";
import ReactTable from "@shubich/react-table";

const cars = [
  {
    mark: "BMW",
    model: "i8",
  },
  {
    mark: "Porsche",
    model: "911",
  },
  {
    mark: "Tesla",
    model: "Model S",
    "0-60 mph": "2.4s"
  }
];

function App() {
  return (
    <ReactTable
      data={cars}
      showIndex={true}
      indexName="id"
    />
  );
}

const rootElement = document.getElementById("root");
render(<App />, rootElement);

Output

idmarkmodel0-60 mph
0BMWi8
1Porsche911
2TeslaModel S2.4s

Examples

CodeSandbox

License

@shubich/react-table is MIT licensed.

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago