dora-ui
Version:
A React.js Mobile UI Library
21 lines (20 loc) • 908 B
TypeScript
import React from 'react';
import { toastType } from './content';
export interface OuterFunc {
(content: React.ReactNode, duration?: number, onClose?: () => void, mask?: boolean): void;
}
export interface InnerFunc {
(type: toastType, content: React.ReactNode, duration?: number, onClose?: () => void, mask?: boolean): void;
}
declare const Toast: {
useIcons: (iconConfig: {
[key: string]: React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
}) => void;
success: OuterFunc;
error: OuterFunc;
info: OuterFunc;
loading: OuterFunc;
loaded: () => void;
destroy: (type?: "error" | "loading" | "success" | "info" | undefined, onClose?: ((...args: any[]) => void) | undefined) => void;
};
export default Toast;