class Primer::Alpha::Dropdown::Menu

used as a standalone component.
This component is part of ‘Dropdown` and should not be

def initialize(as: AS_DEFAULT, direction: DIRECTION_DEFAULT, scheme: SCHEME_DEFAULT, header: nil, **system_arguments)

Parameters:
  • system_arguments (Hash) -- <%= link_to_system_arguments_docs %>
  • header (String) -- Header to be displayed above the menu.
  • direction (Symbol) -- <%= one_of(Primer::Alpha::Dropdown::Menu::DIRECTION_OPTIONS) %>.
  • as (Symbol) -- When `as` is `:list`, wraps the menu in a `
      ` with a `
    • ` for each item.
def initialize(as: AS_DEFAULT, direction: DIRECTION_DEFAULT, scheme: SCHEME_DEFAULT, header: nil, **system_arguments)
  @header = header
  @direction = direction
  @as = fetch_or_fallback(AS_OPTIONS, as, AS_DEFAULT)
  @system_arguments = deny_tag_argument(**system_arguments)
  @system_arguments[:tag] = "details-menu"
  @system_arguments[:role] = "menu"
  @system_arguments[:classes] = class_names(
    @system_arguments[:classes],
    "dropdown-menu",
    "dropdown-menu-#{fetch_or_fallback(DIRECTION_OPTIONS, direction, DIRECTION_DEFAULT)}",
    SCHEME_MAPPINGS[fetch_or_fallback(SCHEME_MAPPINGS.keys, scheme, SCHEME_DEFAULT)]
  )
end

def list?

def list?
  @as == :list
end