Cellcomponent
Cell({ header = false, children, ...props }: CellProps): ReactElement| Param | Type | |
|---|---|---|
props | CellProps | Props for Cell — width and typography variants plus children. required |
.header | boolean |
| Return | |
|---|---|
ReactElement | Rendered <td> element. |
Table cell.
- Rendered as
<td>(or a<th>using<Cell header>). - Sets its column's width via the
widthvariant. Unlike a<col>, a cell honoursmin-width, sowidth="12x" growgives the column a hard minimum that fills the remaining space and keeps the table from collapsing the column on a narrow viewport. - A column's width is the widest of its cells, so use this to size a column that has no header to set the width on.
Examples
<Cell width="12x" grow>A longer description that wants a sensible minimum width.</Cell>