Class: PhlexKit::AlertDescription

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/alert/alert_description.rb

Overview

Body text of a PhlexKit::Alert. See alert.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ AlertDescription

Returns a new instance of AlertDescription.



4
5
6
# File 'app/components/phlex_kit/alert/alert_description.rb', line 4

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

Instance Method Details

#view_template(&block) ⇒ Object



8
9
10
# File 'app/components/phlex_kit/alert/alert_description.rb', line 8

def view_template(&block)
  div(**mix({ class: "pk-alert-description" }, @attrs), &block)
end