class Primer::Beta::NavList::Group
See <%= link_to_component(Primer::Beta::NavList) %> for usage examples.
A logical grouping of navigation links with an optional heading.
def self.custom_element_name
- Private: -
def self.custom_element_name Primer::Beta::NavList.custom_element_name end
def before_render
def before_render super raise ArgumentError, "NavList groups are required to have headings" unless heading? end
def build_avatar_item(component_klass: NavList::Item, **system_arguments)
- Private: -
def build_avatar_item(component_klass: NavList::Item, **system_arguments) super( component_klass: component_klass, selected_item_id: @selected_item_id, **system_arguments ) end
def build_item(component_klass: NavList::Item, **system_arguments)
- Private: -
def build_item(component_klass: NavList::Item, **system_arguments) super( component_klass: component_klass, selected_item_id: @selected_item_id, **system_arguments ) end
def expand!
Cause this group to show its list of sub items when rendered.
def expand! @expanded = true end
def initialize(selected_item_id: nil, **system_arguments)
-
system_arguments
(Hash
) -- <%= link_to_system_arguments_docs %> -
selected_item_id
(Symbol
) -- The ID of the currently selected item. Used internally.
def initialize(selected_item_id: nil, **system_arguments) @system_arguments = system_arguments @selected_item_id = selected_item_id super(**@system_arguments) end
def kind
def kind :group end