Renders a button that acts as a menu item within a menu/1
or menu_bar/1
.
A menu item is meant to be used to trigger an action. For a button that
toggles the visibility of a menu, use menu_button/1
.
<.menu label="Actions">
<:item>
<.menu_item on_click={JS.dispatch("myapp:copy")}>
Copy
</.menu_item>
</:item>
<:item>
<.menu_item on_click={JS.dispatch("myapp:paste")}>
Paste
</.menu_item>
</:item>
</.menu>