import React from 'react'; /** * AnswerAlert 所有可选 type 值的列表(运行时可枚举)。 * * 使用 `as const` 元组而非 `enum`,与项目 TypeScript 规范一致: * 类型 {@link AnswerAlertType} 由该数组派生,新增 type 只需在此一处维护。 */ export declare const ANSWER_ALERT_TYPES: readonly ["success", "error", "warning", "info", "gray"]; /** AnswerAlert 类型联合,由 {@link ANSWER_ALERT_TYPES} 派生 */ export type AnswerAlertType = (typeof ANSWER_ALERT_TYPES)[number]; /** * AnswerAlert 组件的属性接口 * @interface AnswerAlertProps */ export interface AnswerAlertProps { className?: string; style?: React.CSSProperties; /** 内容 */ message?: React.ReactNode; /** 辅助性文字介绍 */ description?: React.ReactNode; /** 自定义图标,`showIcon` 为 true 时有效 */ icon?: React.ReactNode; /** 是否显示辅助图标 */ showIcon?: boolean; /** 指定指示器的样式 */ type?: AnswerAlertType; /** 自定义操作项 */ action?: React.ReactNode; /** 可关闭配置 */ closable?: boolean; /** 关闭时触发的回调函数 */ onClose?: (e: React.MouseEvent) => void; /** * 是否启用进入 / 关闭动画。 * - `true`(默认):mount 时 fade-in + 轻微下滑;点击关闭时 fade-out + 高度收起,动画结束才真正卸载 * - `false`:禁用所有动画,立即 mount / unmount,对 SSR、性能敏感场景或测试更友好 * * 当用户系统开启「减少动态效果」(`prefers-reduced-motion: reduce`)时, * 即使 `motion = true`,CSS 层面也会自动退化为无动画,无需手动处理。 */ motion?: boolean; } export declare const AnswerAlert: React.NamedExoticComponent;