Class: Www::NavbarMenuComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Www::NavbarMenuComponent
- Includes:
- NavbarHelper
- Defined in:
- app/components/www/navbar_menu_component.rb
Overview
Renders a desktop navbar mega-menu dropdown
Menu structure is defined in Www::NavbarHelper::NAVBAR_MENUS
Quick Links appear as right column for product menus only
Usage:
<%= render Www::NavbarMenuComponent.new(menu_key: :floor_heating) %>
Constant Summary
Constants included from NavbarHelper
Www::NavbarHelper::NAVBAR_MENUS
Instance Method Summary collapse
-
#initialize(menu_key:) ⇒ NavbarMenuComponent
constructor
A new instance of NavbarMenuComponent.
Methods included from NavbarHelper
#desktop_items, #desktop_menu_link, #has_quick_links?, #menu_item_badge, #menu_item_icon, #menu_item_url, #mobile_image_url, #mobile_items, #mobile_menu_link, #mobile_quick_link, #navbar_column_class, #navbar_header_tag, #navbar_menu, #navbar_menu_keys, #publication_url_for_menu, #quick_links_for, #single_category_menu?
Methods inherited from ApplicationComponent
#cms_link, #fetch_or_fallback, #image_asset_tag, #image_tag, #number_to_currency, #number_with_delimiter, #post_path, #post_url, #strip_tags
Constructor Details
#initialize(menu_key:) ⇒ NavbarMenuComponent
Returns a new instance of NavbarMenuComponent.
13 14 15 16 |
# File 'app/components/www/navbar_menu_component.rb', line 13 def initialize(menu_key:) @menu_key = @menu = () end |