Class: UI::ContextMenuTrigger
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::ContextMenuTrigger
- Includes:
- ContextMenuTriggerBehavior
- Defined in:
- app/components/ui/context_menu_trigger.rb
Overview
Trigger - Phlex implementation
The element that triggers the context menu on right-click. Uses ContextMenuTriggerBehavior concern for shared styling logic.
Instance Method Summary collapse
-
#initialize(classes: "", **attributes) ⇒ ContextMenuTrigger
constructor
A new instance of ContextMenuTrigger.
- #view_template(&block) ⇒ Object
Methods included from ContextMenuTriggerBehavior
#context_menu_trigger_classes, #context_menu_trigger_data_attributes, #context_menu_trigger_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ ContextMenuTrigger
Returns a new instance of ContextMenuTrigger.
17 18 19 20 |
# File 'app/components/ui/context_menu_trigger.rb', line 17 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
22 23 24 25 26 |
# File 'app/components/ui/context_menu_trigger.rb', line 22 def view_template(&block) div(**.deep_merge(@attributes)) do yield if block_given? end end |