fix: unify tier color mapping, fix feature badge colors
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
20
ui/src/utils/tier.ts
Normal file
20
ui/src/utils/tier.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
export type TierColor = 'primary' | 'success' | 'warning' | 'error' | 'auto';
|
||||
|
||||
export function tierColor(tier: string): TierColor {
|
||||
switch (tier?.toUpperCase()) {
|
||||
case 'BUSINESS':
|
||||
case 'ENTERPRISE':
|
||||
return 'success';
|
||||
case 'HIGH':
|
||||
case 'PRO':
|
||||
return 'primary';
|
||||
case 'MID':
|
||||
case 'STARTER':
|
||||
return 'warning';
|
||||
case 'LOW':
|
||||
case 'FREE':
|
||||
return 'auto';
|
||||
default:
|
||||
return 'auto';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user