Class: PhlexKit::MenubarSub

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/menubar/menubar_sub.rb

Overview

Nested submenu wrapper: SubTrigger row + SubContent panel, revealed on hover/focus with pure CSS. Mirrors shadcn/ui's MenubarSub. See menubar.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ MenubarSub

Returns a new instance of MenubarSub.



5
# File 'app/components/phlex_kit/menubar/menubar_sub.rb', line 5

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

Instance Method Details

#view_templateObject



6
7
8
# File 'app/components/phlex_kit/menubar/menubar_sub.rb', line 6

def view_template(&)
  div(**mix({ class: "pk-menubar-sub" }, @attrs), &)
end