Class: UI::MenubarLabel
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::MenubarLabel
- Includes:
- MenubarLabelBehavior
- Defined in:
- app/components/ui/menubar_label.rb
Overview
Label - Phlex implementation
Non-interactive label/header for menu sections.
Instance Method Summary collapse
-
#initialize(inset: false, classes: "", **attributes) ⇒ MenubarLabel
constructor
A new instance of MenubarLabel.
- #view_template(&block) ⇒ Object
Methods included from MenubarLabelBehavior
#menubar_label_classes, #menubar_label_data_attributes, #menubar_label_html_attributes
Constructor Details
#initialize(inset: false, classes: "", **attributes) ⇒ MenubarLabel
Returns a new instance of MenubarLabel.
18 19 20 21 22 |
# File 'app/components/ui/menubar_label.rb', line 18 def initialize(inset: false, classes: "", **attributes) @inset = inset @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
24 25 26 27 28 |
# File 'app/components/ui/menubar_label.rb', line 24 def view_template(&block) div(**.deep_merge(@attributes)) do yield if block_given? end end |