@stripe/ui-extension-sdk
Version:
The suite of functionality available to UI extensions in Stripe apps
16 lines (15 loc) • 496 B
TypeScript
export type ToastType = 'success' | 'caution' | 'pending' | undefined;
interface BaseOptions {
type?: ToastType;
}
interface WithAction {
action: string;
onAction: () => void;
}
export type ToastOptions = BaseOptions | (BaseOptions & WithAction);
export type ShowToast = (message: string, options?: ToastOptions) => Promise<{
update: (updateMessage: string, updateOptions?: ToastOptions) => void;
dismiss: () => void;
}>;
export declare const showToast: ShowToast;
export {};