Class: PhlexKit::ContextMenuSubContent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/phlex_kit/context_menu/context_menu_sub_content.rb

Overview

The nested panel of a ContextMenuSub — opens beside the trigger. See context_menu.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ ContextMenuSubContent

Returns a new instance of ContextMenuSubContent.



5
# File 'app/components/phlex_kit/context_menu/context_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/context_menu/context_menu_sub_content.rb', line 6

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