Add flashes with StumulusJS

This commit is contained in:
Eugene Burmakin
2024-01-03 12:13:00 +01:00
parent ffa21a5e49
commit 887b84bb65
12 changed files with 84 additions and 28 deletions
@@ -0,0 +1,9 @@
import { Application } from "@hotwired/stimulus"
const application = Application.start()
// Configure Stimulus development experience
application.debug = false
window.Stimulus = application
export { application }
+5
View File
@@ -0,0 +1,5 @@
import { application } from "controllers/application"
// Eager load all controllers defined in the import map under controllers/**/*_controller
import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
eagerLoadControllersFrom("controllers", application)
@@ -0,0 +1,7 @@
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
remove() {
this.element.remove()
}
}