Class: PhlexKit::PopoverTitle

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/popover/popover_title.rb

Overview

Heading of a PopoverHeader, ported from shadcn/ui's PopoverTitle. See popover.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ PopoverTitle

Returns a new instance of PopoverTitle.



5
# File 'app/components/phlex_kit/popover/popover_title.rb', line 5

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

Instance Method Details

#view_templateObject



6
7
8
# File 'app/components/phlex_kit/popover/popover_title.rb', line 6

def view_template(&)
  h2(**mix({ class: "pk-popover-title" }, @attrs), &)
end