UNPKG

@rocket.chat/fuselage-toastbar

Version:
21 lines 796 B
import { ReactNode } from 'react'; export type ToastBarPayload = { type?: 'success' | 'info' | 'error'; message: ReactNode | string | Error; title?: string; position?: 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end'; time: number; id: string; isPersistent?: boolean; }; type ToastBarContextValue = { dispatch: (payload: Omit<ToastBarPayload, 'id' | 'time'> & { time?: number; }) => void; dismiss: (id: ToastBarPayload['id']) => void; }; export declare const ToastBarContext: import("react").Context<ToastBarContextValue>; export declare const useToastBarDispatch: () => ToastBarContextValue["dispatch"]; export declare const useToastBarDismiss: () => ToastBarContextValue["dismiss"]; export {}; //# sourceMappingURL=ToastBarContext.d.ts.map