Class: UI::ContextMenuContent
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::ContextMenuContent
- Includes:
- ContextMenuContentBehavior
- Defined in:
- app/components/ui/context_menu_content.rb
Overview
Content - Phlex implementation
Menu items container with animations and positioning. Uses ContextMenuContentBehavior concern for shared styling logic.
Instance Method Summary collapse
-
#initialize(classes: "", **attributes) ⇒ ContextMenuContent
constructor
A new instance of ContextMenuContent.
- #view_template(&block) ⇒ Object
Methods included from ContextMenuContentBehavior
#context_menu_content_classes, #context_menu_content_data_attributes, #context_menu_content_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ ContextMenuContent
Returns a new instance of ContextMenuContent.
17 18 19 20 |
# File 'app/components/ui/context_menu_content.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_content.rb', line 22 def view_template(&block) div(**.deep_merge(@attributes)) do yield if block_given? end end |