Class: UI::DropdownMenuLabel
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::DropdownMenuLabel
- Includes:
- DropdownMenuLabelBehavior
- Defined in:
- app/components/ui/dropdown_menu_label.rb
Overview
Label - Phlex implementation
Label for menu sections to organize items. Uses DropdownMenuLabelBehavior concern for shared styling logic.
Instance Method Summary collapse
-
#initialize(inset: false, classes: "", **attributes) ⇒ DropdownMenuLabel
constructor
A new instance of DropdownMenuLabel.
- #view_template(&block) ⇒ Object
Methods included from DropdownMenuLabelBehavior
#dropdown_menu_label_classes, #dropdown_menu_label_data_attributes, #dropdown_menu_label_html_attributes
Constructor Details
#initialize(inset: false, classes: "", **attributes) ⇒ DropdownMenuLabel
Returns a new instance of DropdownMenuLabel.
16 17 18 19 20 |
# File 'app/components/ui/dropdown_menu_label.rb', line 16 def initialize(inset: false, classes: "", **attributes) @inset = inset @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
22 23 24 25 26 |
# File 'app/components/ui/dropdown_menu_label.rb', line 22 def view_template(&block) div(**.deep_merge(@attributes)) do yield if block_given? end end |