laif-ds
Version:
Design System di Laif con componenti React basati su principi di Atomic Design
64 lines (53 loc) • 1.15 kB
Markdown
# Table
## Overview
Styled table primitives for building data tables. Provides header, body, footer, rows, cells, and caption.
---
## Exports
- `Table`
- `TableHeader`
- `TableBody`
- `TableFooter`
- `TableRow`
- `TableHead`
- `TableCell`
- `TableCaption`
All extend their corresponding HTML element props.
---
## Examples
```tsx
import {
Table,
TableHeader,
TableBody,
TableRow,
TableHead,
TableCell,
TableCaption,
} from "laif-ds";
export function BasicTable() {
return (
<Table>
<TableCaption>Recent invoices</TableCaption>
<TableHeader>
<TableRow>
<TableHead>Customer</TableHead>
<TableHead>Status</TableHead>
<TableHead>Amount</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow>
<TableCell>Acme Inc.</TableCell>
<TableCell>Paid</TableCell>
<TableCell>€1,200.00</TableCell>
</TableRow>
<TableRow>
<TableCell>Globex</TableCell>
<TableCell>Open</TableCell>
<TableCell>€680.00</TableCell>
</TableRow>
</TableBody>
</Table>
);
}
```