StatusDot 状态点
任务列表 / 推理链通用的状态圆点。三态(done / active / pending)× 两风格(flat / soft)。
| 状态 | 视觉 | 内部 |
|---|---|---|
done | 绿底 + 白勾 | success 填充 + <Icon name="check" /> |
active | 边框 + 内嵌 <PulseDot> | primary 边框 + 跳动 |
pending | 仅边框 | outline 灰边 |
tone='flat'(默认)—— pending/active 底色透明,用于 Task。
tone='soft' —— pending = surface、active = primaryContainer,用于 ChainOfThought(推理链气氛更柔)。
实时预览
flat(任务列表风格)
done
active
pending
soft(推理链风格)
done
active
pending
用法
import { StatusDot } from '@unif/react-native-design';
// 任务列表风格
<StatusDot status="done" size={16} />
<StatusDot status="active" size={16} />
<StatusDot status="pending" size={16} />
// 推理链风格(柔色)
<StatusDot status="active" size={18} tone="soft" />
API
| Prop | 类型 | 默认 | 说明 |
|---|---|---|---|
status | 'done' | 'active' | 'pending' | — | 当前状态 |
size | number | 16 | 圆点直径 |
tone | 'flat' | 'soft' | 'flat' | flat 透明底;soft 柔色底(pending=bgCard、active=primary0) |
内部使用
- Task
TaskRow——<StatusDot status={mapped} size={16} />(todo→pending、running→active、done→done) - ChainOfThought
Step——<StatusDot status={step.status} size={18} tone="soft" />
设计原则
设计上的"做完了 / 在做 / 还没做"在 Unif 系统里只有这一种视觉表达,新组件需要状态指示请直接用 StatusDot,不要自画。