@mmcodemark/fuselage-toastbar
Version:
Fuselage ToastBar component
20 lines • 747 B
TypeScript
/// <reference types="react" />
export type ToastBarPayload = {
type?: 'success' | 'info' | 'error';
message: string | Error;
title?: string;
position?: 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
time: number;
id?: string;
};
type ToastBarContextValue = {
dispatch: (payload: Omit<ToastBarPayload, '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