Class: UI::MenubarComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::MenubarComponent
- Includes:
- MenubarBehavior
- Defined in:
- app/view_components/ui/menubar_component.rb
Overview
MenubarComponent - ViewComponent implementation
Root container for menubar with Stimulus controller.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", **attributes) ⇒ MenubarComponent
constructor
A new instance of MenubarComponent.
Methods included from MenubarBehavior
#menubar_classes, #menubar_data_attributes, #menubar_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ MenubarComponent
Returns a new instance of MenubarComponent.
14 15 16 17 |
# File 'app/view_components/ui/menubar_component.rb', line 14 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
19 20 21 22 23 |
# File 'app/view_components/ui/menubar_component.rb', line 19 def call content_tag :div, **.deep_merge(@attributes) do content end end |