Previews

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
render(Primer::Alpha::ActionMenu.new(select_variant: :single, size: :medium)) do |menu|
menu.with_show_button do |button|
button.with_trailing_action_icon(icon: :"triangle-down")
"A wider menu"
end
menu.with_item(label: "Default", active: true, value: "default") do |item|
item.with_trailing_visual_label(scheme: :accent, inline: true).with_content("Recommended")
item.with_description { "This is an example for wide ActionMenus" }
end
menu.with_item(label: "Extended", active: false, value: "extended") do |item|
item.with_description { "It allows for extended descriptions with extra afforance for additional visuals" }
end
end