GoScrobble/web/node_modules/react-toastify/dist/hooks/useToastContainer.d.ts

17 lines
656 B
TypeScript
Raw Normal View History

2022-04-25 02:47:15 +00:00
/// <reference types="react" />
import { Id, ToastContainerProps, Toast, ToastPosition } from '../types';
export interface ContainerInstance {
toastKey: number;
displayedToast: number;
props: ToastContainerProps;
containerId?: Id | null;
isToastActive: (toastId: Id) => boolean;
getToast: (id: Id) => Toast | null;
}
export declare function useToastContainer(props: ToastContainerProps): {
getToastToRender: <T>(cb: (position: ToastPosition, toastList: Toast[]) => T) => T[];
collection: Record<Id, Toast>;
containerRef: import("react").MutableRefObject<null>;
isToastActive: (id: Id) => boolean;
};