23 lines
692 B
TypeScript
23 lines
692 B
TypeScript
export class MedalDisplay {
|
|
static getColor(position: number): string {
|
|
switch (position) {
|
|
case 1: return 'text-yellow-400';
|
|
case 2: return 'text-gray-300';
|
|
case 3: return 'text-amber-600';
|
|
default: return 'text-gray-500';
|
|
}
|
|
}
|
|
|
|
static getBg(position: number): string {
|
|
switch (position) {
|
|
case 1: return 'bg-yellow-400/10 border-yellow-400/30';
|
|
case 2: return 'bg-gray-300/10 border-gray-300/30';
|
|
case 3: return 'bg-amber-600/10 border-amber-600/30';
|
|
default: return 'bg-iron-gray/50 border-charcoal-outline';
|
|
}
|
|
}
|
|
|
|
static getMedalIcon(position: number): string | null {
|
|
return position <= 3 ? '🏆' : null;
|
|
}
|
|
} |