feat(版本详情): 完善任务流程与风险预警

This commit is contained in:
Script Generator
2026-06-29 18:14:22 +08:00
parent b48a7e2049
commit b7d48f66aa
24 changed files with 3085 additions and 118 deletions

View File

@@ -3,9 +3,12 @@
import { TEST_CASE_STATUS_LABEL, TEST_CASE_STATUS_COLOR } from '@/lib/test-case';
import type { TestCaseStatus } from '@/lib/test-case';
export function TestCaseStatusBadge({ status }: { status: TestCaseStatus }) {
export function TestCaseStatusBadge({ status, widthEm }: { status: TestCaseStatus; widthEm?: number }) {
return (
<span className={`inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium ${TEST_CASE_STATUS_COLOR[status]}`}>
<span
className={`inline-flex h-5 shrink-0 items-center justify-center whitespace-nowrap rounded px-1.5 text-[10px] font-medium ${TEST_CASE_STATUS_COLOR[status]}`}
style={widthEm ? { width: `${widthEm}em` } : undefined}
>
{TEST_CASE_STATUS_LABEL[status]}
</span>
);