@wq2/ui
    Preparing search index...

    Interface IToastOptions

    interface IToastOptions {
        beforeClose?: (result: IToastResult) => Promise<void>;
        beforeEnter?: (result: IToastResult) => Promise<void>;
        className?: string;
        duration: number;
        shadow: boolean;
        style?: string | ((id: string) => string);
        theme: string;
    }
    Index

    Properties

    beforeClose?: (result: IToastResult) => Promise<void>

    Hook before closing the toast, e.g. adding a fade-out transition.

    beforeEnter?: (result: IToastResult) => Promise<void>

    Hook before showing the toast, e.g. adding a fade-in transition.

    className?: string

    Additional className for the toast root element

    duration: number

    The duration for the toast to show.

    shadow: boolean

    Whether to create the toast with ShadowDOM. Note that CSS may not work with ShadowDOM in pages with strict CSP limits.

    style?: string | ((id: string) => string)

    Additional CSS for the toast. :host can be used to match the host element.

    theme: string

    Apply built-in themes, default as light. Available values are light and dark, any other value will disable the theme CSS.