Class: UI::MenubarSubComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::MenubarSubComponent
- Includes:
- MenubarSubBehavior
- Defined in:
- app/view_components/ui/menubar_sub_component.rb
Overview
SubComponent - ViewComponent implementation
Container for submenu (trigger + content).
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", **attributes) ⇒ MenubarSubComponent
constructor
A new instance of MenubarSubComponent.
Methods included from MenubarSubBehavior
#menubar_sub_classes, #menubar_sub_data_attributes, #menubar_sub_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ MenubarSubComponent
Returns a new instance of MenubarSubComponent.
15 16 17 18 |
# File 'app/view_components/ui/menubar_sub_component.rb', line 15 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
20 21 22 23 24 |
# File 'app/view_components/ui/menubar_sub_component.rb', line 20 def call content_tag :div, **.deep_merge(@attributes) do content end end |