Skip to content

Commit eab62db

Browse files
committed
add divider for sub menu
1 parent 1a23ed4 commit eab62db

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

app/components/primer/alpha/action_menu/sub_menu_item.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ def with_item(**system_arguments, &block)
3636
@sub_menu.with_item(form_arguments: @form_arguments, **system_arguments, &block)
3737
end
3838

39+
def with_divider(**system_arguments, &block)
40+
@sub_menu.with_divider(form_arguments: @form_arguments, **system_arguments, &block)
41+
end
42+
3943
def with_avatar_item(**system_arguments, &block)
4044
@sub_menu.with_avatar_item(form_arguments: @form_arguments, **system_arguments, &block)
4145
end

previews/primer/alpha/action_menu_preview/sub_menus.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<% sub_menu.with_sub_menu_item(label: "Paste from") do |sub_menu| %>
1313
<% sub_menu.with_item(label: "Current clipboard") %>
1414
<% sub_menu.with_item(label: "History") %>
15+
<% sub_menu.with_divider %>
1516
<% sub_menu.with_item(label: "Another device") %>
1617
<% end %>
1718
<% end %>

0 commit comments

Comments
 (0)