mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-07 17:02:29 +01:00
16 lines
367 B
JavaScript
16 lines
367 B
JavaScript
import Modal from "../components/modal.js";
|
|
|
|
// prompt, alert, confirm, modal, popup?
|
|
class ModalManager {
|
|
constructor() {
|
|
this.$dom = document.body.querySelector("component-modal");
|
|
}
|
|
|
|
alert($node, opts) {
|
|
if (this.$dom instanceof Modal) {
|
|
this.$dom.trigger($node, opts);
|
|
}
|
|
}
|
|
}
|
|
|
|
export default new ModalManager();
|