Abstract class representing the base behaviour for a modal or non-modal ARIA dialog.
No CSS is provided.
import Dialog from "makeup-dialog";
// non-modal (default)
document.querySelectorAll(".my-non-modal-dialog").forEach(function (el, i) {
const widget = new Dialog(el);
});
// modal
document.querySelectorAll(".my-modal-dialog").forEach(function (el, i) {
const widget = new Dialog(el, { modal: true });
});
The constructor takes a configuration object as its second parameter.
todo
Fired when any dialog is opened.
Fired when any dialog is closed.