react-alert-toastify-wrapper
Version:
A replacement for react-alert using react-toastify under the hood.
32 lines • 1.9 kB
TypeScript
import React, { ReactNode, ReactElement } from "react";
import { ToastContainer as NativeToastContainer, ToastOptions } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
export declare const positions: {
readonly TOP_LEFT: "top-left";
readonly TOP_RIGHT: "top-right";
readonly TOP_CENTER: "top-center";
readonly BOTTOM_LEFT: "bottom-left";
readonly BOTTOM_RIGHT: "bottom-right";
readonly BOTTOM_CENTER: "bottom-center";
};
export declare const transitions: {
readonly SLIDE: ({ children, position, preventExitTransition, done, nodeRef, isIn, playToast }: import("react-toastify").ToastTransitionProps) => React.JSX.Element;
readonly ZOOM: ({ children, position, preventExitTransition, done, nodeRef, isIn, playToast }: import("react-toastify").ToastTransitionProps) => React.JSX.Element;
readonly FLIP: ({ children, position, preventExitTransition, done, nodeRef, isIn, playToast }: import("react-toastify").ToastTransitionProps) => React.JSX.Element;
readonly BOUNCE: ({ children, position, preventExitTransition, done, nodeRef, isIn, playToast }: import("react-toastify").ToastTransitionProps) => React.JSX.Element;
};
declare const alert: {
show: (msg: ReactNode, opts?: ToastOptions) => import("react-toastify").Id;
success: (msg: ReactNode, opts?: ToastOptions) => import("react-toastify").Id;
error: (msg: ReactNode, opts?: ToastOptions) => import("react-toastify").Id;
info: (msg: ReactNode, opts?: ToastOptions) => import("react-toastify").Id;
warning: (msg: ReactNode, opts?: ToastOptions) => import("react-toastify").Id;
removeAll: () => void;
};
export declare const Provider: ({ children, options, }: {
options?: ToastOptions;
children: ReactNode;
}) => ReactElement;
export declare const ToastContainer: typeof NativeToastContainer;
export default alert;
//# sourceMappingURL=index.d.ts.map