1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

Extract Materialize Toast controller

This commit is contained in:
Yassine Guedidi 2025-03-02 12:44:38 +01:00
parent 76c101938d
commit e5042074a2
5 changed files with 18 additions and 12 deletions

View file

@ -0,0 +1,12 @@
import { Controller } from '@hotwired/stimulus';
import M from '@materializecss/materialize';
export default class extends Controller {
connect() {
this.instance = M.toast({ text: this.element.innerText });
}
disconnect() {
this.instance.dismissAll();
}
}