signalizejs/dialog
Wrapper around native JavaScript dialog functionality.
Installation
Required import map dependencies:
const {
dialog,
openDialog,
closeDialog
} = await signalize.resolve('dialog');
API
dialog
dialog('my-dialog');
- Get dialog element by id =>
dialog="my-dialog"
openDialog
openDialog('my-dialog');
- Open dialog by id =>
dialog="my-dialog"
openDialog('my-dialog', {
modelessly: true,
closable: false
});
Options:
- modelessly: Calls show instead of showModal.
- closable: Prevents a dialog from being closed. Usefull for dialogs like Cookie Overlay.
closeDialog
closeDialog('my-dialog');
- Close dialog by id =>
dialog="my-dialog"
Directives
The Dialog module comes with the Signalize default installation. You just need to import it.
__CODE__