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
53
54
55
56
<script type="text/javascript">
window.addEventListener('load', function() {
document.querySelector('button#alert-item').addEventListener('click', (_e) => {
alert('Foo')
});
}, false);
</script>
<action-menu data-select-variant="none" data-view-component="true">
<focus-group direction="vertical" mnemonics retain>
<button id="action-menu-5a9934a1-e3c1-4f68-a271-49d56b1a1b28-button" popovertarget="action-menu-5a9934a1-e3c1-4f68-a271-49d56b1a1b28-overlay" aria-controls="action-menu-5a9934a1-e3c1-4f68-a271-49d56b1a1b28-list" aria-haspopup="true" type="button" data-view-component="true" class="Button--secondary Button--medium Button"> <span class="Button-content">
<span class="Button-label">Trigger</span>
</span>
</button>
<anchored-position id="action-menu-5a9934a1-e3c1-4f68-a271-49d56b1a1b28-overlay" anchor="action-menu-5a9934a1-e3c1-4f68-a271-49d56b1a1b28-button" align="start" side="outside-bottom" anchor-offset="normal" popover="auto" data-view-component="true">
<div data-view-component="true" class="Overlay Overlay--size-auto">
<div data-view-component="true" class="Overlay-body Overlay-body--paddingNone"> <action-list>
<div data-view-component="true">
<ul aria-labelledby="action-menu-5a9934a1-e3c1-4f68-a271-49d56b1a1b28-button" id="action-menu-5a9934a1-e3c1-4f68-a271-49d56b1a1b28-list" role="menu" data-view-component="true" class="ActionListWrap--inset ActionListWrap">
<li data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem">
<button tabindex="-1" id="alert-item" role="menuitem" data-view-component="true" class="ActionListContent">
<span data-view-component="true" class="ActionListItem-label">
Alert
</span>
</button>
</li>
<li data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem">
<a href="/view-components/rails-app/action_menu/landing_page" tabindex="-1" id="item-72b693a0-9de0-4e0c-a774-4a7c9cda0502" role="menuitem" data-view-component="true" class="ActionListContent">
<span data-view-component="true" class="ActionListItem-label">
Navigate
</span>
</a>
</li>
<li data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem">
<clipboard-copy value="Text to copy" tabindex="-1" id="item-5b9207a2-c22f-4caa-aff9-1354f6c5c94d" role="menuitem" data-view-component="true" class="ActionListContent">
<span data-view-component="true" class="ActionListItem-label">
Copy text
</span>
</clipboard-copy>
</li>
<li data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem">
<form role="none" action="/view-components/rails-app/action_menu/form_action.html" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="VxXbMKzIk0boJPhCcRU_nkEwDDDqlkMSJ3CdTJMR7QCtQ7HRTg2pf-SqC8p_03Tohr9FIBLhegEEkCoFnQtK-g" autocomplete="off" />
<input name="foo" value="bar" type="hidden" data-list-item-input="true" data-view-component="true" />
<button tabindex="-1" id="item-1d90028d-d237-48a4-990d-d455249a2c19" type="submit" role="menuitem" data-view-component="true" class="ActionListContent">
<span data-view-component="true" class="ActionListItem-label">
Submit form
</span>
</button>
</form>
</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
16
17
18
19
20
21
22
<script type="text/javascript">
window.addEventListener('load', function() {
document.querySelector('button#alert-item').addEventListener('click', (_e) => {
alert('Foo')
});
}, false);
</script>
<%= render(Primer::Alpha::ActionMenu.new) do |component| %>
<% component.with_show_button { "Trigger" } %>
<% component.with_item(label: "Alert", tag: :button, id: "alert-item", disabled: disable_items) %>
<% component.with_item(label: "Navigate", tag: :a, content_arguments: { href: action_menu_landing_path }, disabled: disable_items) %>
<% component.with_item(label: "Copy text", tag: :"clipboard-copy", content_arguments: { value: "Text to copy" }, disabled: disable_items) %>
<% component.with_item(
label: "Submit form",
href: action_menu_form_action_path(format: route_format),
form_arguments: {
name: "foo", value: "bar", method: :post
},
disabled: disable_items
) %>
<% end %>
Param Description Input

No assets to display.