Class: PhlexKit::ToastDescription
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::ToastDescription
- Defined in:
- app/components/phlex_kit/toast/toast_description.rb
Overview
Muted secondary line under a PhlexKit::ToastTitle. The toaster removes it from a cloned skeleton when the spawn has no description. See toast_region.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ ToastDescription
constructor
A new instance of ToastDescription.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ ToastDescription
Returns a new instance of ToastDescription.
5 6 7 |
# File 'app/components/phlex_kit/toast/toast_description.rb', line 5 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
9 10 11 |
# File 'app/components/phlex_kit/toast/toast_description.rb', line 9 def view_template(&) div(**mix({ class: "pk-toast-description", data: { slot: "description" } }, @attrs), &) end |