Class: UI::ContextMenuLabel
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::ContextMenuLabel
- Includes:
- ContextMenuLabelBehavior
- Defined in:
- app/components/ui/context_menu_label.rb
Overview
Label - Phlex implementation
Non-interactive label for grouping menu items. Uses ContextMenuLabelBehavior concern for shared styling logic.
Instance Method Summary collapse
-
#initialize(inset: false, classes: "", **attributes) ⇒ ContextMenuLabel
constructor
A new instance of ContextMenuLabel.
- #view_template(&block) ⇒ Object
Methods included from ContextMenuLabelBehavior
#context_menu_label_classes, #context_menu_label_data_attributes, #context_menu_label_html_attributes
Constructor Details
#initialize(inset: false, classes: "", **attributes) ⇒ ContextMenuLabel
Returns a new instance of ContextMenuLabel.
16 17 18 19 20 |
# File 'app/components/ui/context_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/context_menu_label.rb', line 22 def view_template(&block) div(**.merge(@attributes)) do yield if block_given? end end |