mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 20:34:19 +00:00
- Extract shared PageHeader with icon/title/subtitle/actions props, replacing duplicated header markup across all 16 pages - Shrink Badge to text-xs with tighter padding for subtler appearance - Change StatusBadge normal states (merged/copied/linked) to default grey variant — only anomalies (warning/danger) use color - TargetsPage: move delete button to top-right, restore dashed separator between path and mode row
17 lines
456 B
TypeScript
17 lines
456 B
TypeScript
import Badge from './Badge';
|
|
|
|
const statusVariant: Record<string, 'success' | 'warning' | 'danger' | 'info' | 'default'> = {
|
|
merged: 'default',
|
|
copied: 'default',
|
|
linked: 'default',
|
|
'not exist': 'warning',
|
|
'has files': 'info',
|
|
conflict: 'danger',
|
|
broken: 'danger',
|
|
unknown: 'default',
|
|
};
|
|
|
|
export default function StatusBadge({ status }: { status: string }) {
|
|
return <Badge variant={statusVariant[status] ?? 'default'}>{status}</Badge>;
|
|
}
|