0.3.20 • Published 9 months ago
@highoutput/hds-table v0.3.20
Getting started
We aim to build a library of custom ReactJS components that implements our unique UI design conventions. The ReactJS components will be based primarily on Chakra UI components. React Storybook will be used for documentation and testing.
Commands
To install the package, use:
npm i @highoutput/hds-table
Usage
import { Table, withTable } from "@highoutput/hds-table";
import { Pagination } from "@highoutput/hds-pagination";
import { ThemeProvider, extendTheme, Box, Text, Button } from "@highoutput/hds";
import * as React from "react";
export default function Example() {
return (
<ThemeProvider>
<Table
data={arrayOfItemsFromDb}
columns={[
{
label: "Name",
renderRow({ name }) {
return (
<Box>
<Text>{name}</Text>
</Box>
);
},
onSort({ direction }) {
// sort handler
},
onClick() {
// click handler
},
tooltip: "Some hint",
onCheck({ isChecked, item }) {
// check handler
},
// could also be a boolean
defaultChecked(data) {
// conditional default check
return data.isActive;
},
onCheckAll({ isChecked, items }) {
// check all handler
},
},
]}
renderHeader={
<Box>
<Text>Users</Text>
</Box>
}
renderFooter={
<Pagination
variant="minimal"
page={1}
pageSize={10}
total={100}
onPageChange={function noop() {}}
/>
}
/>
</ThemeProvider>
);
}
0.3.20
9 months ago
0.3.19
9 months ago
0.3.18
11 months ago
0.3.9
1 year ago
0.3.17
11 months ago
0.3.15
11 months ago
0.3.14
11 months ago
0.3.13
12 months ago
0.3.6
1 year ago
0.3.8
1 year ago
0.3.7
1 year ago
0.3.2
1 year ago
0.3.1
1 year ago
0.3.3
1 year ago
0.2.20
1 year ago
0.2.18
1 year ago
0.2.17
1 year ago
0.2.16
1 year ago
0.2.15
1 year ago
0.2.14
1 year ago
0.2.13
1 year ago
0.2.12
1 year ago
0.3.0
1 year ago
0.2.7
1 year ago
0.2.6
1 year ago
0.2.9
1 year ago
0.2.8
1 year ago
0.2.3
1 year ago
0.2.5
1 year ago
0.2.4
1 year ago
0.1.12
1 year ago
0.2.1
1 year ago
0.2.0
1 year ago
0.1.9
1 year ago
0.2.2
1 year ago
0.1.8
1 year ago
0.1.7
1 year ago
0.1.6
1 year ago
0.1.5
1 year ago
0.1.4
1 year ago
0.1.3
1 year ago
0.1.2
1 year ago
0.1.1
1 year ago