improv(menu): add more types of menu items.

- Added `Checkbox` and `Folder` variants to `MenuItem`.
- Exported `menu_button` macro.
This commit is contained in:
Eduardo Flores 2024-03-18 00:33:07 -07:00 committed by Michael Murphy
parent 171e697738
commit db71a32c38
2 changed files with 67 additions and 35 deletions

View file

@ -144,9 +144,9 @@ pub fn menu_bar<'a>(key_binds: &HashMap<KeyBind, Action>) -> Element<'a, Message
menu_items(
key_binds,
vec![
MenuItem::Action("New window", Action::WindowNew),
MenuItem::Separator,
MenuItem::Action("Quit", Action::WindowClose),
MenuItem::Button("New window", Action::WindowNew),
MenuItem::Divider,
MenuItem::Button("Quit", Action::WindowClose),
],
),
)])