Usage

When called, a customized Boostrap 4 modal will be dynamically built and inserted into the document.
Unless explicitly specified through options, the modal is automatically shown when created, and destroyed then removed from the DOM when closed.

There is no stylesheet provided with BSD, as it rely on Bootstrap styles.
To ease dialogs theming, two CSS classes are automatically added to each dialog : bsd-dialog and bsd-[dialogName] (for instance bsd-alert for alert dialogs).

Arguments

Dialog functions accept two arguments:

title: the html to insert into the dialog popup title.
If undefined, the title element will be removed from the modal.

options: an optional set of options. If a function is provided, it will be used as dialog callback.
All available options can be customized / overrided globally, see options sections for details.