TableHeaderCell
Loading example…
TableHeaderCell is part of the Containers set, imported from @jcsoftdev/ui/containers.
Import
Section titled “Import”import { TableHeaderCell } from "@jcsoftdev/ui/containers";Single-component entry points tree-shake to just this component: @jcsoftdev/ui/containers/table.
<TableHeaderCell aria-label="Inventario de productos"> <> <TableHead> <tr> <TableHeaderCell>Producto</TableHeaderCell> <TableHeaderCell>SKU</TableHeaderCell> <TableHeaderCell alignRight>Stock</TableHeaderCell> <TableHeaderCell alignRight>Precio</TableHeaderCell> </tr> </TableHead> <TableBody> {inventory.map((item) => ( <TableRow key={item.sku}> <TableCell> {item.name} {item.low ? <Chip tone="danger">Stock bajo</Chip> : null} </TableCell> <TableCell>{item.sku}</TableCell> <TableCell alignRight>{item.stock}</TableCell> <TableCell alignRight>{item.price}</TableCell> </TableRow> ))} </TableBody> </></TableHeaderCell>| Prop | Type | Default | Description |
|---|---|---|---|
alignRight |
boolean |
||
columnId |
string |
Identifies the column so it can be pinned. Use the same id on the header and its cells. | |
pinnable |
boolean |
* marks a required prop.
It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).
Storybook stories
Section titled “Storybook stories”Source
Section titled “Source”packages/ui/src/containers/table/table.tsx