Class: UI::DropdownMenuSub
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::DropdownMenuSub
- Includes:
- DropdownMenuSubBehavior
- Defined in:
- app/components/ui/dropdown_menu_sub.rb
Overview
Sub - Phlex implementation
Container for submenu with relative positioning. Uses DropdownMenuSubBehavior concern for shared styling logic.
Instance Method Summary collapse
-
#initialize(classes: "", **attributes) ⇒ DropdownMenuSub
constructor
A new instance of DropdownMenuSub.
- #view_template(&block) ⇒ Object
Methods included from DropdownMenuSubBehavior
#dropdown_menu_sub_classes, #dropdown_menu_sub_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ DropdownMenuSub
Returns a new instance of DropdownMenuSub.
18 19 20 21 |
# File 'app/components/ui/dropdown_menu_sub.rb', line 18 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
23 24 25 26 27 |
# File 'app/components/ui/dropdown_menu_sub.rb', line 23 def view_template(&block) div(**.deep_merge(@attributes)) do yield if block_given? end end |