Files
blitzkit/packages/bot/src/components/TierWeights.tsx
T

32 lines
830 B
TypeScript
Raw Normal View History

2024-09-08 10:11:24 -05:00
import { TierWeightsRecord } from '@blitzkit/core';
2023-07-11 19:54:57 +00:00
import { theme } from '../stitches.config';
2023-06-19 18:08:34 +00:00
2024-03-12 23:36:56 -05:00
interface TierWeightsProps {
2023-06-19 18:08:34 +00:00
weights: TierWeightsRecord;
}
2024-09-08 10:11:24 -05:00
export function TierWeights({ weights }: TierWeightsProps) {
2023-06-19 18:08:34 +00:00
return (
<div style={{ display: 'flex', gap: 8 }}>
{Object.entries(weights).map(([tier, weight]) => (
<div
key={tier}
style={{
2023-07-10 17:44:56 +00:00
backgroundColor: theme.colors.appBackground1_light,
2023-06-19 18:08:34 +00:00
flex: weight,
2023-07-10 17:44:56 +00:00
color: theme.colors.textHighContrast_light,
2023-06-19 18:08:34 +00:00
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontSize: 16,
overflow: 'hidden',
borderRadius: 8,
minWidth: 16,
}}
>
{tier}
2023-06-19 18:08:34 +00:00
</div>
))}
</div>
);
}