Class: Primer::Alpha::ActionMenu::Group

Inherits:
Primer::Alpha::ActionList show all
Defined in:
app/components/primer/alpha/action_menu/group.rb

Overview

This component is part of <%= link_to_component(Primer::Alpha::ActionMenu) %> and should not be used as a standalone component.

Constant Summary

Constants inherited from Primer::Alpha::ActionList

Primer::Alpha::ActionList::ARIA_SELECTION_VARIANT_OPTIONS, Primer::Alpha::ActionList::DEFAULT_ARIA_SELECTION_VARIANT, Primer::Alpha::ActionList::DEFAULT_MENU_ITEM_ROLE, Primer::Alpha::ActionList::DEFAULT_ROLE, Primer::Alpha::ActionList::DEFAULT_SCHEME, Primer::Alpha::ActionList::DEFAULT_SELECT_VARIANT, Primer::Alpha::ActionList::LIST_BOX_ITEM_ROLE, Primer::Alpha::ActionList::MENU_ROLE, Primer::Alpha::ActionList::SCHEME_MAPPINGS, Primer::Alpha::ActionList::SCHEME_OPTIONS, Primer::Alpha::ActionList::SELECT_VARIANT_OPTIONS, Primer::Alpha::ActionList::SELECT_VARIANT_ROLE_MAP

Constants inherited from Component

Component::INVALID_ARIA_LABEL_TAGS

Constants included from Status::Dsl

Status::Dsl::STATUSES

Constants included from ViewHelper

ViewHelper::HELPERS

Constants included from TestSelectorHelper

TestSelectorHelper::TEST_SELECTOR_TAG

Constants included from FetchOrFallbackHelper

FetchOrFallbackHelper::InvalidValueError

Constants included from Primer::AttributesHelper

Primer::AttributesHelper::PLURAL_ARIA_ATTRIBUTES, Primer::AttributesHelper::PLURAL_DATA_ATTRIBUTES

Instance Attribute Summary

Attributes inherited from Primer::Alpha::ActionList

#aria_selection_variant, #id, #role, #select_variant

Instance Method Summary collapse

Methods inherited from Primer::Alpha::ActionList

#acts_as_form_input?, #acts_as_listbox?, #acts_as_menu?, #allows_selection?, #before_render, #build_avatar_item, #build_item, #custom_element_name, custom_element_name, #initialize, #multi_select?, #required_form_arguments_given?, #single_select?, #will_add_item, #with_avatar_item, #with_item

Methods inherited from Component

deprecated?, generate_id

Methods included from JoinStyleArgumentsHelper

#join_style_arguments

Methods included from TestSelectorHelper

#add_test_selector

Methods included from FetchOrFallbackHelper

#fetch_or_fallback, #fetch_or_fallback_boolean, #silence_deprecations?

Methods included from ClassNameHelper

#class_names

Methods included from Primer::AttributesHelper

#aria, #data, #extract_data, #merge_aria, #merge_data, #merge_prefixed_attribute_hashes

Methods included from ExperimentalSlotHelpers

included

Methods included from ExperimentalRenderHelpers

included

Constructor Details

This class inherits a constructor from Primer::Alpha::ActionList

Instance Method Details

#with_dividerObject



17
18
19
# File 'app/components/primer/alpha/action_menu/group.rb', line 17

def with_divider
  raise "ActionMenu groups cannot have dividers"
end

#with_heading(**system_arguments, &block) ⇒ Object

Heading text rendered above the list of items.

Parameters:

  • system_arguments (Hash)

    The arguments accepted by <%= link_to_component(Primer::Alpha::ActionMenu::Heading) %>.



13
14
15
# File 'app/components/primer/alpha/action_menu/group.rb', line 13

def with_heading(**system_arguments, &block)
  super(component_klass: Primer::Alpha::ActionMenu::Heading, **system_arguments, &block)
end