@cwds/datagrid
v1.5.6
Published
Datagrids for CWS-CARES
Downloads
79
Readme
@cwds/datagrid
CARES components for DataGrids.
🛑 NOTICE 🛑
This package may no longer be supported. Please see
ca-cwds/design-system
.
Installation
yarn add '@cwds/datagrid'
Usage
import React from "react";
import ReactDOM from "react-dom";
import DataGrid from "@cwds/datagrid";
const columns = [
{ Header: "Model", accessor: "_row", width: 150 },
{ Header: "mpg", accessor: "mpg" },
{ Header: "cyl", accessor: "cyl" },
{ Header: "disp", accessor: "disp" },
{ Header: "hp", accessor: "hp" },
{ Header: "drat", accessor: "drat" },
{ Header: "wt", accessor: "wt" },
{ Header: "qsec", accessor: "qsec" },
{ Header: "vs", accessor: "vs" },
{ Header: "am", accessor: "am" },
{ Header: "gear", accessor: "gear" },
{ Header: "carb", accessor: "carb" }
];
const App = () => (
<div>
<DataGrid data={mtcars} columns={columns} />
</div>
);
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
You can see in this live and interactive demo in sandbox