• Offcanvas

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

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

    // Create the offcanvas
    let el = document.querySelector("#offcanvasDemo");
    let offcanvas = Components.Offcanvas({
    el: el,
    id: "offcanvasDemo",
    title: "Offcanvas Demo",
    body: "This is the body of the offcanvas.",
    type: Components.OffcanvasTypes.End
    });

    // Create the button
    Components.Button({
    el: document.querySelector("#offcanvasDemo"),
    text: "Show Offcanvas",
    toggleObj: offcanvas
    });

    Parameters

    Returns IOffcanvas

Generated using TypeDoc