UNPKG

1.43 kBTypeScriptView Raw
1import type { ToastType, ToastOptions, ToastWrapperInstance } from './types';
2/**
3 * Display a text toast
4 */
5export declare function showToast(options?: string | ToastOptions): ToastWrapperInstance;
6/**
7 * Display a loading toast
8 */
9export declare const showLoadingToast: (options: string | ToastOptions) => ToastWrapperInstance;
10/**
11 * Display a success toast
12 */
13export declare const showSuccessToast: (options: string | ToastOptions) => ToastWrapperInstance;
14/**
15 * Display a fail toast
16 */
17export declare const showFailToast: (options: string | ToastOptions) => ToastWrapperInstance;
18/**
19 * Close the currently displayed toast
20 */
21export declare const closeToast: (all?: boolean) => void;
22/**
23 * Modify the default configuration that affects all `showToast` calls.
24 * Specify the `type` parameter to modify the default configuration of a specific type of toast
25 */
26export declare function setToastDefaultOptions(options: ToastOptions): void;
27export declare function setToastDefaultOptions(type: ToastType, options: ToastOptions): void;
28/**
29 * Reset the default configuration that affects all `showToast` calls.
30 * Specify the `type` parameter to reset the default configuration of a specific type of toast
31 */
32export declare const resetToastDefaultOptions: (type?: ToastType) => void;
33/**
34 * Allow multiple toasts to be displayed as the same time
35 */
36export declare const allowMultipleToast: (value?: boolean) => void;