UNPKG

@nutui/nutui-react-taro

Version:

京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序

35 lines (34 loc) 1.23 kB
import { BasicComponent } from '../../utils/typings'; import { ToastWordBreak } from './toast'; import * as React from 'react'; export interface NotificationProps extends BasicComponent { id?: string; icon: 'success' | 'fail' | 'loading' | 'warn' | React.ReactNode; content: string | React.ReactNode; duration: number; position?: 'top' | 'center' | 'bottom'; title: string; size: string | number; closeOnOverlayClick: boolean; lockScroll: boolean; contentClassName?: string; contentStyle?: React.CSSProperties; wordBreak?: ToastWordBreak; onClose: () => void; } export interface NotificationState { show: boolean; } export default class Notification extends React.PureComponent<NotificationProps, NotificationState> { static newInstance: (properties: NotificationProps, callback: any) => void; private closeTimer; constructor(props: NotificationProps); close(): void; startCloseTimer(): void; clearCloseTimer(): void; clickCover(): void; renderIcon(): number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined; componentDidMount(): void; componentWillUnmount(): void; render(): React.JSX.Element; }