ButtonItem
Install
yarn add @ntds/dropdownImport
import { Dropdown } from '@ntds/dropdown';Usage
<Dropdown
items={() => (
<>
<Dropdown.Group>
<Dropdown.Item
checked
onChange={() => {}}
value='value'
>
This is a Radio
</Dropdown.Item>
...
</Dropdown.Group>
</>
)}
>
...
</Dropdown>Props
| Prop | Type | Default | Description |
|---|---|---|---|
iconRight? | ComponentType<IconProps> | — | Icon that will be displayed on the right side of the dropdown item |
onClick? | () => void | — | Action that gets triggered by clicking the element |
children | ReactNode | — | Usually simple text, but can be anything |