TableLoading
Loading example…
Placeholder rows for the first load. The rows are decorative; one status region announces the load.
Import
Section titled “Import”import { TableLoading } from "@jcsoftdev/ui/containers";Single-component entry points tree-shake to just this component: @jcsoftdev/ui/containers/table.
<TableLoading 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> </></TableLoading>| Prop | Type | Default | Description |
|---|---|---|---|
columns * |
number |
Number of columns of the table. | |
rows |
number |
5 |
Placeholder rows. Default 5. |
label |
string |
Text announced to screen readers. Defaults to the localized “Loading”. |
* marks a required prop.
Storybook stories
Section titled “Storybook stories”- Default
- Link Rows
- Empty
- PinnedColumns
- User Pinning
- Controlled Pinning
- Narrow
- Flush
- Sticky Header
- Selection
- Actions Wide
- Actions Narrow Menu
- Actions Narrow Wrap
- Sortable
- Loading And Empty
- Column Visibility
- Density
- Sticky Actions
Source
Section titled “Source”packages/ui/src/containers/table/table-parts.tsx