Class: Polaris::ShopifyNavigationComponent
- Inherits:
-
Component
- Object
- Component
- Polaris::ShopifyNavigationComponent
- Defined in:
- app/components/polaris/shopify_navigation_component.rb
Defined Under Namespace
Classes: ShopifyNavigationLinkComponent
Instance Method Summary collapse
-
#initialize(auto_detect_active: false, **system_arguments) ⇒ ShopifyNavigationComponent
constructor
A new instance of ShopifyNavigationComponent.
- #render? ⇒ Boolean
Constructor Details
#initialize(auto_detect_active: false, **system_arguments) ⇒ ShopifyNavigationComponent
Returns a new instance of ShopifyNavigationComponent.
9 10 11 12 13 14 15 16 17 18 |
# File 'app/components/polaris/shopify_navigation_component.rb', line 9 def initialize(auto_detect_active: false, **system_arguments) @auto_detect_active = auto_detect_active @system_arguments = system_arguments @system_arguments[:tag] = "div" @system_arguments[:classes] = class_names( @system_arguments[:classes], "shp-Navigation" ) end |
Instance Method Details
#render? ⇒ Boolean
20 21 22 |
# File 'app/components/polaris/shopify_navigation_component.rb', line 20 def render? links.any? end |