dora-ui
Version:
A React.js Mobile UI Library
47 lines (46 loc) • 1.54 kB
TypeScript
import React, { Component } from 'react';
import PropTypes from 'prop-types';
export declare type toastType = 'success' | 'error' | 'info' | 'loading';
export interface Props {
container: HTMLElement;
content: React.ReactNode;
type: toastType;
mask: boolean;
duration: number;
onClose: (...args: any[]) => any;
}
declare class ToastContent extends Component<Props, {
visible: boolean;
}> {
static 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;
static icons: {
[key: string]: React.ReactElement;
};
static propTypes: {
container: PropTypes.Validator<any>;
type: PropTypes.Validator<string>;
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
mask: PropTypes.Requireable<boolean>;
duration: PropTypes.Requireable<number>;
onClose: PropTypes.Requireable<(...args: any[]) => any>;
};
static defaultProps: {
mask: boolean;
duration: number;
onClose: () => void;
};
timer?: any;
isExecClose: boolean;
state: {
visible: boolean;
};
get isLoading(): boolean;
get isInfo(): boolean;
componentDidMount(): void;
componentWillUnmount(): void;
renderIcon: () => JSX.Element | null;
render(): JSX.Element;
}
export default ToastContent;