1.2.5 • Published 6 years ago

cm-bootstrap-modal v1.2.5

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

cm-bootstrap-modal

An ES6 module wrapper around Bootstrap 4 modals, to create modals in JavaScript.

Installation

npm install installs bootstrap, popper.js and jQuery, needed for bootstrap modals.

Usage

<script type="module">
    import {BootstrapModal} from "./src/cm-bootstrap-modal/BootstrapModal.js";

    new BootstrapModal().show("A Simple Modal", "Hello World!");
</script>

Examples

Demo Page

Configuration

this.config = {
    dialogCss: "", // Additional css for ".modal-dialog", like "modal-lg" or "modal-sm"
    modalCss: "fade", // Additional css for ".modal"
    options: null // The Bootstrap modal options as described here: https://getbootstrap.com/docs/4.0/components/modal/#options
};