Previews

No matching results.

x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<action-menu data-select-variant="single" data-view-component="true">
<focus-group direction="vertical" mnemonics retain>
<button id="action-menu-9dfccd9a-3150-4a39-b021-62707f04333b-button" popovertarget="action-menu-9dfccd9a-3150-4a39-b021-62707f04333b-overlay" aria-controls="action-menu-9dfccd9a-3150-4a39-b021-62707f04333b-list" aria-haspopup="true" type="button" data-view-component="true" class="Button--secondary Button--medium Button"> <span class="Button-content">
<span class="Button-label">A wider menu</span>
</span>
<span class="Button-visual Button-trailingAction">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down">
<path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path>
</svg>
</span>
</button>
<anchored-position id="action-menu-9dfccd9a-3150-4a39-b021-62707f04333b-overlay" anchor="action-menu-9dfccd9a-3150-4a39-b021-62707f04333b-button" align="start" side="outside-bottom" anchor-offset="normal" popover="auto" data-view-component="true">
<div data-view-component="true" class="Overlay Overlay--size-medium">
<div data-view-component="true" class="Overlay-body Overlay-body--paddingNone"> <action-list>
<div data-view-component="true">
<ul aria-labelledby="action-menu-9dfccd9a-3150-4a39-b021-62707f04333b-button" id="action-menu-9dfccd9a-3150-4a39-b021-62707f04333b-list" role="menu" data-view-component="true" class="ActionListWrap--inset ActionListWrap">
<li value="default" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem">
<button tabindex="-1" id="item-d9b6c24b-8891-4506-bff0-b2536702aa62" type="button" role="menuitemradio" aria-checked="true" data-view-component="true" class="ActionListContent">
<span class="ActionListItem-visual ActionListItem-action--leading">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check ActionListItem-singleSelectCheckmark">
<path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path>
</svg>
</span>
<span data-view-component="true" class="ActionListItem-descriptionWrap">
<span data-view-component="true" class="ActionListItem-label">
Default
</span> <span data-view-component="true" class="ActionListItem-description">This is an example for wide ActionMenus</span>
</span> <span class="ActionListItem-visual ActionListItem-visual--trailing">
<span data-view-component="true" class="Label Label--accent Label--inline">Recommended</span>
</span>
</button>
</li>
<li value="extended" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem">
<button tabindex="-1" id="item-6d579159-f664-4761-ab3d-e0965269e8c8" type="button" role="menuitemradio" aria-checked="false" data-view-component="true" class="ActionListContent">
<span class="ActionListItem-visual ActionListItem-action--leading">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check ActionListItem-singleSelectCheckmark">
<path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path>
</svg>
</span>
<span data-view-component="true" class="ActionListItem-descriptionWrap">
<span data-view-component="true" class="ActionListItem-label">
Extended
</span> <span data-view-component="true" class="ActionListItem-description">It allows for extended descriptions with extra afforance for additional visuals</span>
</span></button>
</li>
</ul>
</div>
</action-list>
</div>
</div>
</anchored-position> </focus-group>
</action-menu>
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

No assets to display.