@rocket.chat/fuselage-toastbar
Version:
Fuselage ToastBar component
21 lines • 801 B
TypeScript
import type { 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