react-material-action-dropdown
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

React Material - Action Dropdown Menu

This is a Material select but instead of changing a form value, the left side of the arrow does some action. Just triggers download for now but considering redirecting or new tab as a future improvement

image

Why the package was created?

When needing this component for work I couldn't find a library that does this. So I needed to hand roll my own. And thus, I am publishing this package in the hope that it can help someone else that needs to do something similar

How to use

import { ActionDropdownMenu, MenuItemShape } from 'react-material-action-dropdown';

const menuItems: MenuItemShape[] = [{ id: 'id', text: 'text to display', link: 'e.g. download link'}]

...
<ActionDropdownMenu menuItems={menuItems} initialValue={menuItems[0]} />
...

Package Sidebar

Install

npm i react-material-action-dropdown

Weekly Downloads

2

Version

1.0.5

License

MIT

Unpacked Size

12.3 kB

Total Files

8

Last publish

Collaborators

  • joseph-reyes