Class: UI::MenubarLabelComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::MenubarLabelComponent
- Includes:
- MenubarLabelBehavior
- Defined in:
- app/view_components/ui/menubar_label_component.rb
Overview
LabelComponent - ViewComponent implementation
Non-interactive label for grouping items.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(inset: false, classes: "", **attributes) ⇒ MenubarLabelComponent
constructor
A new instance of MenubarLabelComponent.
Methods included from MenubarLabelBehavior
#menubar_label_classes, #menubar_label_data_attributes, #menubar_label_html_attributes
Constructor Details
#initialize(inset: false, classes: "", **attributes) ⇒ MenubarLabelComponent
Returns a new instance of MenubarLabelComponent.
12 13 14 15 16 |
# File 'app/view_components/ui/menubar_label_component.rb', line 12 def initialize(inset: false, classes: "", **attributes) @inset = inset @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 |
# File 'app/view_components/ui/menubar_label_component.rb', line 18 def call content_tag :div, **.deep_merge(@attributes) do content end end |