react-table-px-styles
Version:
Supporting files for styling react-table https://github.com/tannerlinsley/react-table in the predix-ui style
45 lines (34 loc) • 1.24 kB
Markdown
Unofficial Predix-Styled react-table styles and custom components
This project contains a style sheet and custom components to style [react-table](https://github.com/tannerlinsley/react-table) as defined by the Predix Design System for React based web applications. Styles are based on the [Predix UI paginated datagrid component](https://www.predix-ui.com/#/elements/data-grid/px-data-grid-paginated).
Install this package.
```
// npm
npm install react-table-px-styles
// yarn
yarn add react-table-px-styles
```
Import the styles from this package after importing the default react-table CSS styles.
```
// JS (Webpack)
import 'react-table/react-table.css';
import 'react-table-px-styles/react-table.css';
// Old-school
<link rel="stylesheet" href="node_modules/react-table/react-table.css">
<link rel="stylesheet" href="node_modules/react-table-px-styles/react-table.css">
```
Import the custom paginator component if a paginated table is required.
```
import { PxReactTablePagination } from 'react-table-px-styles';
```
Pass the custom paginator into the React Table.
```
<ReactTable
...
PaginationComponent={PxReactTablePagination}
.../>
```
See LICENSE.md for details