Class: PhlexKit::AlertTitle
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::AlertTitle
- Defined in:
- app/components/phlex_kit/alert/alert_title.rb
Overview
Heading line of a PhlexKit::Alert. A div, matching shadcn/ui's markup (role="alert" on the box carries the semantics). See alert.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ AlertTitle
constructor
A new instance of AlertTitle.
- #view_template(&block) ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ AlertTitle
Returns a new instance of AlertTitle.
5 6 7 |
# File 'app/components/phlex_kit/alert/alert_title.rb', line 5 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template(&block) ⇒ Object
9 10 11 |
# File 'app/components/phlex_kit/alert/alert_title.rb', line 9 def view_template(&block) div(**mix({ class: "pk-alert-title" }, @attrs), &block) end |