mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-12 03:13:12 +01:00
13 lines
322 B
JavaScript
13 lines
322 B
JavaScript
// prompt, alert, confirm, modal, popup?
|
|
class ModalManager {
|
|
constructor() {
|
|
this.$dom = document.body.querySelector("component-modal");
|
|
if (!this.$dom) throw new Error("dom not set");
|
|
}
|
|
|
|
alert($node, opts) {
|
|
this.$dom.trigger($node, opts);
|
|
}
|
|
}
|
|
|
|
export default new ModalManager();
|