mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-17 10:53:57 +01:00
currency icons
This commit is contained in:
1 parent
f0e0d849d5
commit
d9ce16b41a
6 files changed
+83
-35
No files matched your search
@@ -36,13 +36,12 @@ function PriceEntry({ entry }: PriceEntryProps) {
|
||||
throw new Error("Unsupported price type");
|
||||
}
|
||||
|
||||
const [, iconName] = entry.currency_price.currency_catalog_id.split(".");
|
||||
|
||||
return (
|
||||
<Text size="minor" lowContrast className={styles.entry}>
|
||||
<div className={styles.wrapper}>
|
||||
<img
|
||||
className={styles.icon}
|
||||
src="https://static.vecteezy.com/system/resources/thumbnails/047/493/988/small/hairy-fluffy-cat-playing-png.png"
|
||||
/>
|
||||
<img className={styles.icon} src={`/api/currencies/${iconName}.webp`} />
|
||||
{formatCompact(locale, entry.currency_price.amount)}
|
||||
</div>
|
||||
</Text>
|
||||
|
||||
@@ -11,13 +11,17 @@
|
||||
gap: var(--space-3);
|
||||
|
||||
.stage {
|
||||
padding: var(--space-3);
|
||||
position: relative;
|
||||
aspect-ratio: 3 / 4;
|
||||
|
||||
font-size: 2em;
|
||||
|
||||
.icon {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
|
||||
transform: translateX(var(--space-1));
|
||||
transform: translate(var(--space-1), calc(-1 * var(--space-1)));
|
||||
}
|
||||
|
||||
.tier {
|
||||
|
||||
@@ -8,8 +8,8 @@ import { useProtagonist } from "../../hooks/useProtagonist";
|
||||
import { useStrings } from "../../hooks/useStrings";
|
||||
import { useUpgradePreset } from "../../hooks/useUpgradePreset";
|
||||
import { Tankopedia } from "../../stores/tankopedia";
|
||||
import { Button } from "../Button";
|
||||
import { Heading } from "../Heading";
|
||||
import { IconButton } from "../IconButton";
|
||||
import { Price } from "../Price";
|
||||
import { Section } from "../Section";
|
||||
import { Text } from "../Text";
|
||||
@@ -117,7 +117,7 @@ function LineElement({ index, lineName, stage }: LineElementProps) {
|
||||
const isSelected = upgrades[lineName] === index;
|
||||
|
||||
return (
|
||||
<IconButton
|
||||
<Button
|
||||
color={isSelected ? undefined : "gray"}
|
||||
variant={isSelected ? "surface" : "soft"}
|
||||
radius="1"
|
||||
@@ -183,6 +183,6 @@ function LineElement({ index, lineName, stage }: LineElementProps) {
|
||||
</Text>
|
||||
|
||||
{price && <Price className={styles.price} price={price} />}
|
||||
</IconButton>
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user