mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
chore(profile): added level badges for player summary
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
export function calculateExpStyles(exp: number, isSupporter = false) {
|
||||
const bgColor = exp > -1 ? (exp < 2 ? '#26B0D9' : `hsl(${-exp * 5 + 100}, 85%, 50%)`) : '#666';
|
||||
|
||||
const fontColor = exp > 14 || exp == -1 ? 'white' : 'black';
|
||||
const boxShadow = isSupporter ? `0 0 6px 2px ${bgColor};` : '';
|
||||
|
||||
return { 'background-color': bgColor, color: fontColor, 'box-shadow': boxShadow };
|
||||
}
|
||||
Reference in New Issue
Block a user