• Modal

    import { Components } from "gd-sprest-bs";

    // Modal elements should be added to the body
    var elModal = document.querySelector("#modal-demo");
    if(elModal === null) {
    elModal = document.createElement("div");
    elModal.id = "modal-demo";
    document.body.appendChild(elModal);
    }

    // Create the modal
    let modal = Components.Modal({
    el: el,
    id: "modalDemo",
    title: "Modal Demo",
    type: Components.ModalTypes.Small,
    body: "This is the body of the modal."
    });

    // Create the button
    Components.Button({
    el: document.querySelector("#modalDemo"),
    text: "Show Modal",
    toggleObj: modal,
    type: Components.ButtonTypes.OutlinePrimary
    });

    Parameters

    • props: IModalProps<HTMLElement>
    • Optional template: string

    Returns IModal

Generated using TypeDoc