UNPKG

@prismatic-io/embedded

Version:

Embed Prismatic's integration marketplace and workflow designer within your existing application.

27 lines (26 loc) 960 B
export declare const getPopover: () => Element | null; export declare const openPopover: () => void; /** * Programmatically closes the currently open Prismatic popover. This notifies * the embedded iframe that the marketplace was closed and dispatches a * `POPOVER_CLOSED` event on the window. * * The popover also closes automatically when the user clicks the close button, * clicks the overlay backdrop, or presses the Escape key. * * @example * // Close the popover from your own UI * document.getElementById("my-close-btn") * .addEventListener("click", () => prismatic.closePopover()); * * @example * // Listen for the popover closed event * window.addEventListener("message", (event) => { * if (event.data.event === "POPOVER_CLOSED") { * console.log("Popover was closed"); * } * }); * * @see {@link https://prismatic.io/docs/embed/marketplace/ | Embedding the Marketplace} */ export declare const closePopover: () => void;