ToastApi: {
    dismiss: (toast: HTMLElement) => void;
    show: (message: string, options?: ToastOptions) => HTMLElement;
}

Imperative handle returned by enhanceToast.

Type declaration

  • dismiss: (toast: HTMLElement) => void

    Dismiss a toast element previously returned by show.

  • show: (message: string, options?: ToastOptions) => HTMLElement

    Show a toast with message and return its element.