2025-10-13 23:15:32 -05:00
|
|
|
import type { TierWeightsRecord } from "@blitzkit/core";
|
|
|
|
|
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 (
|
2025-10-13 23:15:32 -05:00
|
|
|
<div style={{ display: "flex", gap: 8 }}>
|
2023-06-19 18:08:34 +00:00
|
|
|
{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,
|
2025-10-13 23:15:32 -05:00
|
|
|
display: "flex",
|
|
|
|
|
alignItems: "center",
|
|
|
|
|
justifyContent: "center",
|
2023-06-19 18:08:34 +00:00
|
|
|
fontSize: 16,
|
2025-10-13 23:15:32 -05:00
|
|
|
overflow: "hidden",
|
2023-06-19 18:08:34 +00:00
|
|
|
borderRadius: 8,
|
|
|
|
|
minWidth: 16,
|
|
|
|
|
}}
|
|
|
|
|
>
|
2023-10-11 19:01:00 -05:00
|
|
|
{tier}
|
2023-06-19 18:08:34 +00:00
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|