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
<form method="get" action="?" id="my-form"> <input type="hidden" name="time" value="2024-12-23T16:34:19+00:00"></form><action-menu data-select-variant="none" data-view-component="true"> <focus-group direction="vertical" mnemonics retain> <button id="menu-1-button" popovertarget="menu-1-overlay" aria-controls="menu-1-list" aria-haspopup="true" type="button" data-view-component="true" class="Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Menu</span> </span> </button> <anchored-position data-target="action-menu.overlay" id="menu-1-overlay" anchor="menu-1-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="menu-1-button" id="menu-1-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 form="my-form" type="button" name="label" value="Submitted!" tabindex="-1" id="item-e68bdb0f-26de-41db-8b23-c208fe3bdcd3" role="menuitem" data-view-component="true" class="ActionListContent"> <span data-view-component="true" class="ActionListItem-descriptionWrap"> <span data-view-component="true" class="ActionListItem-label"> Submit form </span> <span data-view-component="true" class="ActionListItem-description">Not yet submitted</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
<form method="get" action="?" id="my-form"> <input type="hidden" name="time" value="<%= Time.now.iso8601 %>"></form><%= render(Primer::Alpha::ActionMenu.new(menu_id: "menu-1")) do |menu| %> <% menu.with_show_button { params["label"] || "Menu" } %> <% menu.with_item(label: "Submit form", tag: "button", content_arguments: { form: "my-form", type: "submit", name: "label", value: "Submitted!" }) do |item| %> <% if params["time"] %> <% item.with_description.with_content("Last submitted at #{params["time"]}") %> <% elsif %> <% item.with_description.with_content("Not yet submitted") %> <% end %> <% end %><% end %>
No notes provided.
No params configured.
No assets to display.