Feedback 结果说明
呈现提示、结果或问题说明及明确的后续操作。
交互示例
交互示例加载中…
用法
<Feedback
tone="warning"
title="资料尚未完整"
message="补充剩余信息后再继续。"
action={{ id: 'edit', label: '补充信息', onPress: openEditor }}
/>
行为与接入
tone 默认 info,还支持 success、warning 与 error。message 为必要说明,标题和操作可选。
组件只显示给定内容,不从错误文字判断是否能重试。action 使用共同的 ChatAction;未传操作时不会增加按钮,也不会自动重发请求。
API
查看完整 TypeScript 类型
以下内容由包根公开类型生成,与当前源码保持一致。
import type { StyleProp, ViewStyle } from 'react-native';
import type { ChatAction } from '@unif/react-native-chat';
export type FeedbackTone = 'info' | 'success' | 'warning' | 'error';
export interface FeedbackProps {
message: string;
title?: string;
tone?: FeedbackTone;
action?: ChatAction;
style?: StyleProp<ViewStyle>;
testID?: string;
}