import React, { Component } from 'react'; import './style/index.less'; declare const ToastTypes: ["info", "success", "error", "loading", "warn"]; declare const ToastDirections: ["column", "row"]; declare type ToastType = typeof ToastTypes[number]; declare type ToastDirection = typeof ToastDirections[number]; declare type ToastEventHandler = () => void; interface ToastData { type?: ToastType; text?: string; direction?: ToastDirection; bgColor?: string; timeout?: number; style?: React.CSSProperties; className?: string; callback?: ToastEventHandler; } declare class Toast extends Component { static contextType: React.Context; static info(text: string, data?: ToastData): any; static success(text?: string, data?: ToastData): any; static error(text?: string, data?: ToastData): any; static warn(text: string, data?: ToastData): any; static loading(text?: string, data?: ToastData): any; static hide(): any; } export default Toast;