mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-17 10:53:57 +01:00
feat: compact icons
This commit is contained in:
1 parent
2184c1c703
commit
3a91e082d5
4 files changed
+76
-6
No files matched your search
@@ -3,5 +3,5 @@
|
||||
|
||||
aspect-ratio: 1 / 1;
|
||||
|
||||
font-size: 2rem;
|
||||
font-size: 1.75em;
|
||||
}
|
||||
@@ -1,20 +1,32 @@
|
||||
.lines {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
gap: var(--space-3);
|
||||
|
||||
.line {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
gap: var(--space-2);
|
||||
gap: var(--space-3);
|
||||
|
||||
.stage {
|
||||
position: relative;
|
||||
|
||||
img {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
}
|
||||
|
||||
.tier {
|
||||
position: absolute;
|
||||
left: var(--space-2);
|
||||
top: var(--space-2);
|
||||
}
|
||||
}
|
||||
|
||||
.arrow {
|
||||
display: contents;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { UpgradeLine } from "@blitzkit/closed/protos/game/proto/legacy/blitz_static_tank_upgrade_line";
|
||||
import { CaretDownIcon } from "@radix-ui/react-icons";
|
||||
import { romanize } from "@blitzkit/core";
|
||||
import { Fragment } from "react";
|
||||
import { api } from "../../core/api/dynamic";
|
||||
import { useAwait } from "../../hooks/useAwait";
|
||||
@@ -8,6 +8,7 @@ import { Tankopedia } from "../../stores/tankopedia";
|
||||
import { Heading } from "../Heading";
|
||||
import { IconButton } from "../IconButton";
|
||||
import { Section } from "../Section";
|
||||
import { Text } from "../Text";
|
||||
import styles from "./index.module.css";
|
||||
|
||||
export function TankopediaLoadout() {
|
||||
@@ -40,12 +41,18 @@ function Line({ line }: LineProps) {
|
||||
|
||||
return (
|
||||
<div className={styles.line}>
|
||||
{line.name}
|
||||
|
||||
{line.stages.map((stage, index) => {
|
||||
const isSelected = upgrades[line.name] === index;
|
||||
|
||||
return (
|
||||
<Fragment key={stage.tech_name}>
|
||||
{index !== 0 && <CaretDownIcon width="1em" height="1em" />}
|
||||
{/* {index !== 0 && (
|
||||
<Text lowContrast className={styles.arrow}>
|
||||
<CaretRightIcon width="1em" height="1em" />
|
||||
</Text>
|
||||
)} */}
|
||||
|
||||
<IconButton
|
||||
variant={isSelected ? "solid" : "surface"}
|
||||
@@ -104,7 +111,10 @@ function Line({ line }: LineProps) {
|
||||
<img src={`/api/tanks/modules/${stage.stage_type}.webp`} />
|
||||
{/* {stage.display_name} */}
|
||||
{/* {stage.grade} */}
|
||||
{/* {stage.number} */}
|
||||
|
||||
<Text lowContrast size="minor" className={styles.tier}>
|
||||
{romanize(stage.number)}
|
||||
</Text>
|
||||
</IconButton>
|
||||
</Fragment>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user