table-cell
v4.9.10arrow_drop_down<TableCell>
will be rendered as an <th>
or <td>
depending
on the context it is used in. Where context literally is the
React context
.
Since it is not decided via prop, we have create loose typings here.
Set the text-align on the table cell content.
Monetary or generally number fields should be right aligned as that allows you to add them up quickly in your head without having to worry about decimals.
The table cell contents.
The component used for the root node. Either a string to use a DOM element or a component.
Sets the padding applied to the cell.
By default, the Table parent component set the value (default
).
Set scope attribute.
Specify the size of the cell.
By default, the Table parent component set the value (medium
).
Set aria-sort direction.
Specify the cell type. By default, the TableHead, TableBody or TableFooter parent component set the value.
The component renders a <th>
element when the parent context is a header
or otherwise a <td>
element.
Demos:
API:
The component renders a <th>
element when the parent context is a header
or otherwise a <td>
element.
Name | Type | Description |
---|---|---|
align | 'center' | 'inherit' | 'justify' | 'left' | 'right' | Set the text-align on the table cell content. Monetary or generally number fields should be right aligned as that allows you to add them up quickly in your head without having to worry about decimals. |
children | node | The table cell contents. |
classes | object | Override or extend the styles applied to the component. See CSS API below for more details. |
className | string | |
component | elementType | The component used for the root node. Either a string to use a DOM element or a component. |
padding | 'checkbox' | 'default' | 'none' | Sets the padding applied to the cell.
By default, the Table parent component set the value ( |
scope | string | Set scope attribute. |
size | 'medium' | 'small' | Specify the size of the cell.
By default, the Table parent component set the value ( |
sortDirection | 'asc' | 'desc' | false | Set aria-sort direction. |
variant | 'body' | 'footer' | 'head' | Specify the cell type. By default, the TableHead, TableBody or TableFooter parent component set the value. |