# frozen_string_literal: true module Primer module Alpha class Dropdown # This component is part of `Dropdown` and should not be # used as a standalone component. class Menu < Primer::Component status :alpha AS_DEFAULT = :default AS_OPTIONS = [AS_DEFAULT, :list].freeze SCHEME_DEFAULT = :default SCHEME_MAPPINGS = { SCHEME_DEFAULT => "", :dark => "dropdown-menu-dark" }.freeze DIRECTION_DEFAULT = :se DIRECTION_OPTIONS = [DIRECTION_DEFAULT, :sw, :w, :e, :ne, :s].freeze # @param tag [Symbol] <%= one_of(Primer::Alpha::Dropdown::Menu::Item::TAG_OPTIONS) %>. # @param divider [Boolean] Whether the item is a divider without any function. # @param system_arguments [Hash] <%= link_to_system_arguments_docs %> renders_many :items, lambda { |divider: false, **system_arguments| Primer::Alpha::Dropdown::Menu::Item.new(as: @as, divider: divider, **system_arguments) } # @param as [Symbol] When `as` is `:list`, wraps the menu in a `