Class: Primer::TabNavComponent
- Includes:
- TabbedComponentHelper
- Defined in:
- app/components/primer/tab_nav_component.rb
Overview
Use TabNav to style navigation with a tab-based selected state, typically used for navigation placed at the top of the page.
Constant Summary
Constants included from Status::Dsl
Constants included from ViewHelper
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Instance Method Summary collapse
-
#initialize(aria_label: nil, with_panel: false, **system_arguments) ⇒ TabNavComponent
constructor
A new instance of TabNavComponent.
Methods included from TabbedComponentHelper
Methods included from JoinStyleArgumentsHelper
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean, #silence_deprecations?
Methods included from ClassNameHelper
Constructor Details
#initialize(aria_label: nil, with_panel: false, **system_arguments) ⇒ TabNavComponent
Returns a new instance of TabNavComponent.
69 70 71 72 73 74 75 76 77 78 79 |
# File 'app/components/primer/tab_nav_component.rb', line 69 def initialize(aria_label: nil, with_panel: false, **system_arguments) @aria_label = aria_label @with_panel = with_panel @system_arguments = system_arguments @system_arguments[:tag] ||= :div @system_arguments[:classes] = class_names( "tabnav", system_arguments[:classes] ) end |