Modals are UI blocking dialogs that overlay the entire content of the page until the user responds.
New modals can be created by calling new zd.Modal({})
. The class
constructor accepts an options object.
zd.Modal({
title,
message,
type,
onConfirm,
onCancel
})
Use these as follows
Property | Default | Value |
---|---|---|
message |
null |
The modal body (required) |
title |
null |
The title of the modal (optional) |
type |
alert |
The modal type alert , confirm |
onConfirm |
null |
Callback when user confirms |
onCancel |
null |
Callback when user cancels. type: confirm only. |