interface ContentDialogOptions {
    htmlContent: string | HTMLElement;
    onclose?: (shadowRoot: ShadowRoot) => any;
    onopened?: (shadowRoot: ShadowRoot, close: () => void) => any;
    pagination?: {
        initialPageIndex?: number;
        onpagechange?: (newPageIndex: number) => void;
        pageCount: number;
    };
    styles?: string;
    title?: string;
}

Properties

htmlContent: string | HTMLElement

HTML content of the dialog.

onclose?: (shadowRoot: ShadowRoot) => any

Called when the dialog closes.

Type declaration

    • (shadowRoot: ShadowRoot): any
    • Parameters

      • shadowRoot: ShadowRoot

        The shadow root that contains the HTML content and styles.

      Returns any

onopened?: (shadowRoot: ShadowRoot, close: () => void) => any

Called when the dialog is opened.

Type declaration

    • (shadowRoot: ShadowRoot, close: () => void): any
    • Parameters

      • shadowRoot: ShadowRoot

        The shadow root that contains the HTML content and styles.

      • close: () => void

        This function call closes the dialog.

      Returns any

pagination?: {
    initialPageIndex?: number;
    onpagechange?: (newPageIndex: number) => void;
    pageCount: number;
}

Type declaration

  • OptionalinitialPageIndex?: number

    Index of the initially selected page. Defaults to 0.

  • Optionalonpagechange?: (newPageIndex: number) => void

    Called when the page is changed.

  • pageCount: number

    The total amount of pages.

styles?: string

CSS styles for the dialog content.

title?: string

Title of the dialog.