mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-23 00:45:16 +00:00
17 lines
656 B
TypeScript
17 lines
656 B
TypeScript
/// <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;
|
|
};
|