Class: RailsDevtools::Components::FlashMessage
- Inherits:
-
ApplicationComponent
- Object
- Phlex::HTML
- ApplicationComponent
- RailsDevtools::Components::FlashMessage
- Defined in:
- app/views/rails_devtools/components/flash_message.rb
Instance Method Summary collapse
-
#initialize(message:) ⇒ FlashMessage
constructor
A new instance of FlashMessage.
- #view_template ⇒ Object
Methods inherited from ApplicationComponent
Constructor Details
#initialize(message:) ⇒ FlashMessage
Returns a new instance of FlashMessage.
4 5 6 |
# File 'app/views/rails_devtools/components/flash_message.rb', line 4 def initialize(message:) = end |
Instance Method Details
#view_template ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/views/rails_devtools/components/flash_message.rb', line 8 def view_template div( class: "transition transform duration-1000 hidden", data: { controller: "notification", notification_delay_value: "2000", transition_enter_from: "opacity-0 translate-x-6", transition_enter_to: "opacity-100 translate-x-0", transition_leave_from: "opacity-100 translate-x-0", transition_leave_to: "opacity-0 translate-x-6" } ) do div(class: "toast toast-top toast-end") do div(role: "alert", class: "alert alert-success") do span { } end end end end |