Class: PhlexKit::ItemHeader

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/item/item_header.rb

Overview

Full-width header band of an Item (e.g. a cover image) — the item stacks into a column when present. Ported from shadcn/ui's ItemHeader. See item.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ ItemHeader

Returns a new instance of ItemHeader.



5
# File 'app/components/phlex_kit/item/item_header.rb', line 5

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

Instance Method Details

#view_templateObject



6
# File 'app/components/phlex_kit/item/item_header.rb', line 6

def view_template(&) = div(**mix({ class: "pk-item-header" }, @attrs), &)