JavaScript class representing an ARIA alert dialog
npm install makeup-alert-dialogJavaScript class representing an alert dialog. No CSS provided.
The following markup structure and classnames are required. Any SVG icons can be used.
`` Dialog descriptionhtml
class="alert-dialog alert-dialog--mask-fade"
role="alertdialog"
aria-labelledby="alert-dialog-title"
aria-modal="true"
>
CSS
No CSS is provided. However, the class is fully compatible with eBay Skin.
JavaScript
`js
import AlertDialog from "makeup-alert-dialog";document.querySelectorAll(".alert-dialog").forEach(function (el, i) {
const widget = new AlertDialog(el, config);
});
``The constructor takes a configuration object as its second parameter.
todo
Fired when the alert dialog is opened.
Fired when the alert dialog is closed.
Fired when the alert dialog is acknowledged.