UNPKG

@redocly/theme

Version:

Shared UI components lib

12 lines (11 loc) 592 B
import type { ToastContextValue, ToastOptions } from '../types/toast'; type TypedToastOptions = Omit<ToastOptions, 'title' | 'type'>; interface UseToastReturn extends ToastContextValue { info: (title: string, options?: TypedToastOptions) => string; success: (title: string, options?: TypedToastOptions) => string; warning: (title: string, options?: TypedToastOptions) => string; error: (title: string, options?: TypedToastOptions) => string; loading: (title: string, options?: TypedToastOptions) => string; } export declare function useToast(): UseToastReturn; export {};