import type React from 'react'; import type { ViewProps } from 'react-native'; export declare type NotifyType = 'primary' | 'success' | 'danger' | 'warning'; export declare type NotifyMessage = string | React.ReactNode; export interface NotifyProps extends ViewProps { visible?: boolean; /** 字体颜色 */ color?: string; /** 展示时长(ms),值为 0 时,notify 不会消失 */ duration?: number; /** 展示文案,支持通过\n换行 */ message?: NotifyMessage; /** 背景颜色 */ background?: string; /** * 类型 * @default 'danger' */ type?: NotifyType; /** 点击时的回调函数 */ onPress?: () => void; /** 关闭时的回调函数 */ onClose?: () => void; /** 完全展示后的回调函数 */ onOpened?: () => void; } export declare type NotifyPrivateProps = { /** @private */ onClosed?: () => void; }; export declare type NotifyOptions = Omit; export declare type NotifyMethodProps = string | Omit; export declare type NotifyStatic = { /** 展示提示 */ show: (option: NotifyProps | string) => void; /** 关闭提示 */ clear: () => void; /** 修改默认配置,对所有 Notify 生效 */ setDefaultOptions: (options: NotifyOptions) => void; /** 重置默认配置,对所有 Notify 生效 */ resetDefaultOptions: () => void; /** @private */ currentOptions: NotifyOptions; };