Table
A basic table component. The table component contains sub components that allows you to construct a table.
Header 1 | Header 2 | Header 3 |
---|---|---|
Cell 1 | Cell 2 | Cell 3 |
Cell 1 | Cell 2 | Cell 3 |
Usage
import { Table } from "@newfold/ui-component-library";
<Table>
<Table.Head>
<Table.Row>
<Table.Header>
Header 1
</Table.Header>
<Table.Header>
Header 2
</Table.Header>
<Table.Header>
Header 3
</Table.Header>
</Table.Row>
</Table.Head>
<Table.Body>
<Table.Row>
<Table.Cell>
Cell 1
</Table.Cell>
<Table.Cell>
Cell 2
</Table.Cell>
<Table.Cell>
Cell 3
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
Cell 1
</Table.Cell>
<Table.Cell>
Cell 2
</Table.Cell>
<Table.Cell>
Cell 3
</Table.Cell>
</Table.Row>
</Table.Body>
</Table>
Sub Components
The table component contains the following sub components:
-- Table
---- Table.Head
------ Table.Row
-------- Table.Header
---- Table.Body
------ Table.Row
-------- Table.Cell
Props
Attribute | Type | Description | Default |
---|---|---|---|
children | node | | Table content | - |
className | string | | - | - |