Class: UI::DropdownMenuContent
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::DropdownMenuContent
- Includes:
- DropdownMenuContentBehavior
- Defined in:
- app/components/ui/dropdown_menu_content.rb
Overview
Content - Phlex implementation
Menu items container with animations and positioning. Uses DropdownMenuContentBehavior concern for shared styling logic.
Instance Method Summary collapse
-
#initialize(side_offset: 4, classes: "", **attributes) ⇒ DropdownMenuContent
constructor
A new instance of DropdownMenuContent.
- #view_template(&block) ⇒ Object
Methods included from DropdownMenuContentBehavior
#dropdown_menu_content_classes, #dropdown_menu_content_data_attributes, #dropdown_menu_content_html_attributes
Constructor Details
#initialize(side_offset: 4, classes: "", **attributes) ⇒ DropdownMenuContent
Returns a new instance of DropdownMenuContent.
18 19 20 21 22 |
# File 'app/components/ui/dropdown_menu_content.rb', line 18 def initialize(side_offset: 4, classes: "", **attributes) @side_offset = side_offset @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
24 25 26 27 28 |
# File 'app/components/ui/dropdown_menu_content.rb', line 24 def view_template(&block) div(**.deep_merge(@attributes)) do yield if block_given? end end |