Basic table styling for the NICE design system
-
@nice-digital/nds-table
- Installation - Usage - React - Props - SCSS - HTML
Install Node, and then:
npm i @nice-digital/nds-table --save
Import the Table
component from the package and use within JSX:
import React from "react";
import { Table } from "@nice-digital/nds-table";
<Table>
<tr>
<td>Data!</td>
</tr>
</Table>
Note: The React component automatically imports the SCSS, so there's no need to import the SCSS directly yourself.
- Type:
React.node
(required)
The component will only return the surrounding table tag. The rest of the table must be supplied as children.
<Table>
<tr>
<td>Data!</td>
</tr>
</Table>
- Type:
string
Any additional classes you would like cascading to the table
tag.
If you're not using React, then import the SCSS directly into your application by:
@forward '@nice-digital/nds-table/scss/table';
If you're not using React, then include the SCSS as above and use the HTML:
<table class="table">
<tbody>
<tr>
<td>Data!</td>
</tr>
</tbody>
</table>