Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 65x 65x 2x 5x 5x | interface RunPhaseIconProps {
phase: 'pending' | 'running' | 'succeeded' | 'failed' | 'warning'
}
const config: Record<string, { symbol: string; color: string }> = {
pending: { symbol: '\u25CB', color: 'text-muted-foreground' },
running: { symbol: '\u25CF', color: 'text-blue-500 animate-pulse' },
succeeded: { symbol: '\u2713', color: 'text-green-500' },
failed: { symbol: '\u2717', color: 'text-red-500' },
warning: { symbol: '\u26A0', color: 'text-amber-500' },
}
export function RunPhaseIcon({ phase }: RunPhaseIconProps) {
const { symbol, color } = config[phase]
return (
<span className={`inline-flex items-center gap-1 ${color}`}>
<span className="text-base leading-none">{symbol}</span>
<span className="text-sm">{phase}</span>
</span>
)
}
|