do to formatters
This commit is contained in:
39
apps/website/lib/formatters/LeagueTierFormatter.ts
Normal file
39
apps/website/lib/formatters/LeagueTierFormatter.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* LeagueTierDisplay
|
||||
*
|
||||
* Deterministic display logic for league tiers.
|
||||
*/
|
||||
|
||||
export interface LeagueTierDisplayData {
|
||||
color: string;
|
||||
bgColor: string;
|
||||
border: string;
|
||||
icon: string;
|
||||
}
|
||||
|
||||
export class LeagueTierFormatter {
|
||||
private static readonly CONFIG: Record<string, LeagueTierDisplayData> = {
|
||||
premium: {
|
||||
color: 'text-yellow-400',
|
||||
bgColor: 'bg-yellow-500/10',
|
||||
border: 'border-yellow-500/30',
|
||||
icon: '⭐'
|
||||
},
|
||||
standard: {
|
||||
color: 'text-primary-blue',
|
||||
bgColor: 'bg-primary-blue/10',
|
||||
border: 'border-primary-blue/30',
|
||||
icon: '🏆'
|
||||
},
|
||||
starter: {
|
||||
color: 'text-gray-400',
|
||||
bgColor: 'bg-gray-500/10',
|
||||
border: 'border-gray-500/30',
|
||||
icon: '🚀'
|
||||
},
|
||||
};
|
||||
|
||||
static getDisplay(tier: 'premium' | 'standard' | 'starter'): LeagueTierDisplayData {
|
||||
return this.CONFIG[tier];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user