Class: UI::CommandItem
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::CommandItem
- Includes:
- CommandItemBehavior
- Defined in:
- app/components/ui/command_item.rb
Instance Method Summary collapse
-
#initialize(value: nil, disabled: false, classes: "", **attributes) ⇒ CommandItem
constructor
A new instance of CommandItem.
- #view_template ⇒ Object
Methods included from CommandItemBehavior
#command_item_classes, #command_item_data_attributes, #command_item_html_attributes
Constructor Details
#initialize(value: nil, disabled: false, classes: "", **attributes) ⇒ CommandItem
Returns a new instance of CommandItem.
6 7 8 9 10 11 |
# File 'app/components/ui/command_item.rb', line 6 def initialize(value: nil, disabled: false, classes: "", **attributes) @value = value @disabled = disabled @classes = classes @attributes = attributes end |
Instance Method Details
#view_template ⇒ Object
13 14 15 |
# File 'app/components/ui/command_item.rb', line 13 def view_template(&) div(**command_item_html_attributes.deep_merge(@attributes), &) end |