mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
17 lines
302 B
JavaScript
17 lines
302 B
JavaScript
import { Controller } from "stimulus";
|
|
|
|
export default class extends Controller {
|
|
connect() {
|
|
setTimeout(this.fadeout, 1500);
|
|
}
|
|
|
|
fadeout = () => {
|
|
this.element.classList.add("animate-hide-500");
|
|
setTimeout(this.remove, 500);
|
|
};
|
|
|
|
remove = () => {
|
|
this.element.remove();
|
|
};
|
|
}
|