components/KeyValue
import { … } from 'zidane-ui'ui/src/components/KeyValue.tsx
Components#
KeyValueComponent#
Renders labelled values as a dl.
function KeyValue(props: KeyValueProps): ElementParameters
| Name | Type | Description |
|---|---|---|
| props | KeyValueProps |
Returns
ElementProps
| Name | Type | Default | Description |
|---|---|---|---|
| className? | string | Extra classes on the list. | |
| items | readonly KeyValueItem[] | The rows, in order. | |
| layout? | 'grid' | 'split' | 'grid' |
|
| meta? | boolean | Show the values in the metadata voice (mono, tabular, small, muted). | |
| size? | 'label' | 'ui' | 'label' |
|
| style? | CSSProperties | Inline styles on the list. |
Interfaces#
KeyValueItemInterface#
One row of a KeyValue.
interface KeyValueItemProperties
| Name | Type | Description |
|---|---|---|
| id? | string | A stable key. Default: the label when it is a string, else the index. |
| label | ReactNode | What the value is. |
| value | ReactNode | The value. |
KeyValuePropsInterface#
Props for KeyValue.
interface KeyValuePropsProperties
| Name | Type | Default | Description |
|---|---|---|---|
| className? | string | Extra classes on the list. | |
| items | readonly KeyValueItem[] | The rows, in order. | |
| layout? | 'grid' | 'split' | 'grid' |
|
| meta? | boolean | Show the values in the metadata voice (mono, tabular, small, muted). | |
| size? | 'label' | 'ui' | 'label' |
|
| style? | CSSProperties | Inline styles on the list. |