- KMKevinBanana bossAwake
Props
List
itemsListItem[]Rows; ones with
onClickbecome buttons. See the ListItem table below.dividedbooleanDefault:trueDraw lines between rows.
classNamestringDefault:''Extra classes for the root element.
| Prop | Type | Default | Description |
|---|---|---|---|
items | ListItem[] | – | Rows; ones with onClick become buttons. See the ListItem table below. |
divided | boolean | true | Draw lines between rows. |
className | string | '' | Extra classes for the root element. |
ListItem
keystring | numberUnique key of the row.
primaryReactNodeMain text of the row.
secondaryReactNodeSmaller text under the primary text.
leadingReactNodeContent before the text, e.g. an icon or avatar.
trailingReactNodeContent at the end of the row.
onClick() => voidMakes the row a button.
| Prop | Type | Default | Description |
|---|---|---|---|
key | string | number | – | Unique key of the row. |
primary | ReactNode | – | Main text of the row. |
secondary | ReactNode | – | Smaller text under the primary text. |
leading | ReactNode | – | Content before the text, e.g. an icon or avatar. |
trailing | ReactNode | – | Content at the end of the row. |
onClick | () => void | – | Makes the row a button. |