Skip to content

Commit

Permalink
add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
langermank committed Jul 12, 2023
1 parent 600ebd9 commit d5166c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion previews/primer/alpha/action_menu_preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def content_labels

# @label Default
#
# @snapshot
# @snapshot interactive
def default
render(Primer::Alpha::ActionMenu.new(menu_id: "menu-1")) do |menu|
menu.with_show_button { |button| button.with_trailing_action_icon(icon: :"triangle-down"); "Menu" }
Expand All @@ -51,6 +51,7 @@ def default

# @label Wide
#
# @snapshot interactive
def wide
render(Primer::Alpha::ActionMenu.new(select_variant: :single, size: :medium)) do |menu|
menu.with_show_button { |button| button.with_trailing_action_icon(icon: :"triangle-down"); "A wider menu" }
Expand Down Expand Up @@ -120,6 +121,7 @@ def links

# @label Single item selected
#
# @snapshot interactive
def single_selected_item
render(Primer::Alpha::ActionMenu.new(select_variant: :single)) do |menu|
menu.with_show_button { "Menu" }
Expand All @@ -131,6 +133,7 @@ def single_selected_item

# @label Single Select with Internal Label
#
# @snapshot interactive
def single_select_with_internal_label
render(Primer::Alpha::ActionMenu.new(select_variant: :single, dynamic_label: true, dynamic_label_prefix: "Menu")) do |menu|
menu.with_show_button { |button| button.with_trailing_action_icon(icon: :"triangle-down"); "Menu" }
Expand All @@ -144,6 +147,7 @@ def single_select_with_internal_label

# @label Multiple items selected
#
# @snapshot interactive
def multiple_selected_items
render(Primer::Alpha::ActionMenu.new(select_variant: :multiple)) do |menu|
menu.with_show_button { "Menu" }
Expand Down
1 change: 1 addition & 0 deletions previews/primer/alpha/dropdown_preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def playground(overlay: :default, with_caret: false)

# @label Default
#
# @snapshot interactive
def default
render(Primer::Alpha::Dropdown.new) do |component|
component.with_button { "Dropdown" }
Expand Down

0 comments on commit d5166c3

Please sign in to comment.