Class: PhlexKit::MenubarLabel

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

Overview

Non-interactive heading row in a MenubarContent. Mirrors shadcn/ui's MenubarLabel. See menubar.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ MenubarLabel

Returns a new instance of MenubarLabel.



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

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

Instance Method Details

#view_templateObject



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

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