@sikt/sds-table
v2.0.2
Published
## Consume
Downloads
1,638
Readme
@sikt/sds-table
Consume
npm i -s @sikt/sds-table
React
import { Table } from "@sikt/sds-table";
import "@sikt/sds-table/dist/index.css";
<Table>
<TableHead>
<TableRow>
<TableHeader>Header</TableHeader>
</TableRow>
</TableHead>
<TableBody>
<TableRow>
<TableCell data-th="Header">Cell</TableCell>
</TableRow>
</TableBody>
</Table>;
Note: That you need to add the data-th
to all cells of the body for the mobile view to work.
Stylesheets & custom markup
Import stylesheet:
@import url("@sikt/sds-table");
Create custom markup:
<div class="sds-table"></div>