Class: PhlexKit::DropdownMenuSubContent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/phlex_kit/dropdown_menu/dropdown_menu_sub_content.rb

Overview

The nested panel of a DropdownMenuSub — opens beside the trigger. See dropdown_menu.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ DropdownMenuSubContent

Returns a new instance of DropdownMenuSubContent.



5
# File 'app/components/phlex_kit/dropdown_menu/dropdown_menu_sub_content.rb', line 5

def initialize(**attrs) = (@attrs = attrs)

Instance Method Details

#view_templateObject



6
7
8
9
10
# File 'app/components/phlex_kit/dropdown_menu/dropdown_menu_sub_content.rb', line 6

def view_template(&)
  div(**mix({ class: "pk-dropdown-menu-sub-content", role: "menu" }, @attrs)) do
    div(class: "pk-dropdown-menu-viewport", &)
  end
end