feat(版本详情): 完善任务流程与风险预警
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user