Skip to content

Commit 668a48f

Browse files
authored
Revert "Allow nested sub-menus in the ActionMenu component" (#3638)
Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com>
1 parent 41b64d6 commit 668a48f

36 files changed

Lines changed: 354 additions & 1514 deletions

.changeset/forty-ghosts-admire.md

Lines changed: 0 additions & 5 deletions
This file was deleted.
17 Bytes
Loading
17 Bytes
Loading
-692 Bytes
Loading
-697 Bytes
Loading
-692 Bytes
Loading
-697 Bytes
Loading
4.91 KB
Loading
4.9 KB
Loading
Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
11
<%= render Primer::BaseComponent.new(**@system_arguments) do %>
2-
<%= render(@primary_menu) %>
2+
<focus-group direction="vertical" mnemonics retain>
3+
<%= render(@overlay) do |overlay| %>
4+
<% overlay.with_body(padding: :none) do %>
5+
<% if @src.present? %>
6+
<%= render(Primer::Alpha::IncludeFragment.new(src: @src, loading: preload? ? :eager : :lazy, "data-target": "action-menu.includeFragment")) do %>
7+
<%= render(Primer::Alpha::ActionMenu::List.new(id: "#{@menu_id}-list", menu_id: @menu_id)) do |list| %>
8+
<% list.with_item(
9+
aria: { disabled: true },
10+
content_arguments: {
11+
display: :flex,
12+
align_items: :center,
13+
justify_content: :center,
14+
text_align: :center,
15+
autofocus: true
16+
}
17+
) do %>
18+
<%= render Primer::Beta::Spinner.new(aria: { label: "Loading content..." }) %>
19+
<% end %>
20+
<% end %>
21+
<% end %>
22+
<% else %>
23+
<%= render(@list) %>
24+
<% end %>
25+
<% end %>
26+
<% end %>
27+
</focus-group>
328
<% end %>

0 commit comments

Comments
 (0)