func onSelect (() -> ()) -> Self Runs a closure when the menu item is selected.
func disabled(Bool) -> Self Disables the menu item.
func toolTip (String) -> Self Set the tooltip displayed when hovering over the menu item.
Framework
func shortcut(_ shortcut: String, holding modifiers: NSEvent.ModifierFlags = .command) -> Self
MenuItem("Quit")
.shortcut("q")
MenuItem("Commit…")
.shortcut("c", holding: [.option, .command])func onSelect (() -> ()) -> Self func disabled(Bool) -> Self func toolTip (String) -> Self