Files
gridpilot.gg/apps/website/lib/formatters/SkillLevelFormatter.ts
2026-01-24 01:07:43 +01:00

41 lines
1.2 KiB
TypeScript

export class SkillLevelFormatter {
static getLabel(skillLevel: string): string {
const levels: Record<string, string> = {
pro: 'Pro',
advanced: 'Advanced',
intermediate: 'Intermediate',
beginner: 'Beginner',
};
return levels[skillLevel] || skillLevel;
}
static getColor(skillLevel: string): string {
const colors: Record<string, string> = {
pro: 'text-yellow-400',
advanced: 'text-purple-400',
intermediate: 'text-primary-blue',
beginner: 'text-green-400',
};
return colors[skillLevel] || 'text-gray-400';
}
static getBgColor(skillLevel: string): string {
const colors: Record<string, string> = {
pro: 'bg-yellow-400/10',
advanced: 'bg-purple-400/10',
intermediate: 'bg-primary-blue/10',
beginner: 'bg-green-400/10',
};
return colors[skillLevel] || 'bg-gray-400/10';
}
static getBorderColor(skillLevel: string): string {
const colors: Record<string, string> = {
pro: 'border-yellow-400/30',
advanced: 'border-purple-400/30',
intermediate: 'border-primary-blue/30',
beginner: 'border-green-400/30',
};
return colors[skillLevel] || 'border-gray-400/30';
}
}