@spark-web/action-dropdown
v1.0.2
Published
A pill-shaped button component that displays a dropdown menu of actions when clicked.
Downloads
542
Readme
@spark-web/action-dropdown
A pill-shaped button component that displays a dropdown menu of actions when clicked.
Usage
import { ActionDropdown } from '@spark-web/action-dropdown';
const MyComponent = () => (
<ActionDropdown
label="Actions"
actions={[
{
label: 'Edit',
value: 'edit',
onClick: data => console.log('Edit clicked', data),
data: { id: 1 },
},
{
label: 'Delete',
value: 'delete',
onClick: data => console.log('Delete clicked', data),
data: { id: 1 },
},
]}
/>
);