Class: PhlexKit::ItemHeader
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::ItemHeader
- 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
-
#initialize(**attrs) ⇒ ItemHeader
constructor
A new instance of ItemHeader.
- #view_template ⇒ Object
Methods inherited from BaseComponent
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_template ⇒ Object
6 |
# File 'app/components/phlex_kit/item/item_header.rb', line 6 def view_template(&) = div(**mix({ class: "pk-item-header" }, @attrs), &) |