import { ReactNode } from 'react'; import { DelayHandler } from '@befe/brick-utils'; import { AlertProps } from '@befe/brick-comp-alert'; export declare const TOAST_TYPES: readonly ["info", "success", "warning", "error", "loading"]; export declare const TOAST_DURATION_MIN = 3000; export declare const TOAST_DURATION_DEFAULT = 3000; type PropsFromAlert = Pick; export interface ToastProps extends PropsFromAlert { /** * 自定义 class */ className?: string; /** * 类型 */ type?: (typeof TOAST_TYPES)[number]; /** * 标题 */ headline?: ReactNode; /** * 内容 */ content?: ReactNode; /** * 显示时长 * - <= 0 表示不自动关闭 * - <= minDuration 的正值将自动修正为 minDuration * - minDuration 是设计规范上定义的常量,不可配置 * - 目前 minDuration === default === 3s */ duration?: number; /** * 关闭回调 */ onClose?: () => void; /** * 是否可手动关闭(关闭小叉) */ manualClose?: boolean; } export declare const CODE_MSG_DURATION_MIN: string; export declare const CODE_MSG_DURATION_ZERO: string; export declare const CODE_MSG_DURATION_NUMBER: string; export declare const CODE_MSG_DURATION_MANUAL_CLOSE: string; export declare const FADE_IN_SLIDE_DURATION = 300; /** * Toast 对外实例句柄(经 ref 调用) */ export interface ToastHandle { slideOut: (callback: () => void) => void; readonly closeTimer: DelayHandler; } export declare const Toast: import("react").ForwardRefExoticComponent>; export {};