Class: Primer::MenuComponent
- Defined in:
- app/components/primer/menu_component.rb
Overview
Use menus to create vertical lists of navigational links.
Constant Summary
Constants included from Status::Dsl
Constants included from ViewHelper
Constants included from TestSelectorHelper
TestSelectorHelper::TEST_SELECTOR_TAG
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Instance Method Summary collapse
-
#initialize(**system_arguments) ⇒ MenuComponent
constructor
A new instance of MenuComponent.
- #render? ⇒ Boolean
Methods included from JoinStyleArgumentsHelper
Methods included from TestSelectorHelper
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean, #silence_deprecations?
Methods included from ClassNameHelper
Constructor Details
#initialize(**system_arguments) ⇒ MenuComponent
Returns a new instance of MenuComponent.
56 57 58 59 60 61 62 63 |
# File 'app/components/primer/menu_component.rb', line 56 def initialize(**system_arguments) @system_arguments = system_arguments @system_arguments[:tag] = :nav @system_arguments[:classes] = class_names( "menu", @system_arguments[:classes] ) end |
Instance Method Details
#render? ⇒ Boolean
65 66 67 |
# File 'app/components/primer/menu_component.rb', line 65 def render? items.any? end |