Class: Polaris::NavigationComponent
- Inherits:
-
Component
- Object
- Component
- Polaris::NavigationComponent
- Defined in:
- app/components/polaris/navigation_component.rb
Instance Method Summary collapse
-
#initialize(logo: nil, **system_arguments) ⇒ NavigationComponent
constructor
A new instance of NavigationComponent.
- #renders? ⇒ Boolean
Constructor Details
#initialize(logo: nil, **system_arguments) ⇒ NavigationComponent
Returns a new instance of NavigationComponent.
6 7 8 9 |
# File 'app/components/polaris/navigation_component.rb', line 6 def initialize(logo: nil, **system_arguments) @logo = logo.is_a?(Hash) ? Polaris::Logo.new(**logo) : logo @system_arguments = system_arguments end |
Instance Method Details
#renders? ⇒ Boolean
11 12 13 |
# File 'app/components/polaris/navigation_component.rb', line 11 def renders? sections.any? || items.any? end |