ButtonItem
Install
yarn add @ntds/dropdown
Import
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
ButtonItem
Prop | Type & Description |
---|---|
iconRight | React.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 |