Skip to content

Commit 5509d6e

Browse files
committed
tweak(ui): update appearance and layout of money badges
1 parent dc66b8d commit 5509d6e

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

web/src/components/ShopInterface.tsx

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Text, Stack, Title, Grid, Button, Skeleton, Group, NumberFormatter, Badge, Tooltip, CloseButton } from "@mantine/core";
2-
import { useState } from "react";
1+
import { Text, Stack, Title, Grid, Skeleton, Group, NumberFormatter, Badge, CloseButton, Flex } from "@mantine/core";
32
import { fetchNui } from "../utils/fetchNui";
43
import { useStoreShop } from "../stores/ShopStore";
54
import { useStoreSelf } from "../stores/PlayerDataStore";
@@ -21,7 +20,11 @@ function ShopTitle() {
2120
</Stack>
2221
);
2322

24-
return <Title order={1}>{CurrentShop?.label}</Title>;
23+
return (
24+
<Title order={1} ml={20}>
25+
{CurrentShop?.label}
26+
</Title>
27+
);
2528
}
2629

2730
function PlayerData() {
@@ -37,15 +40,15 @@ function PlayerData() {
3740
);
3841

3942
return (
40-
<Group h="fit-content" gap={6} mr={390}>
41-
<Badge size="lg" leftSection={<FontAwesomeIcon size="lg" icon={faMoneyBill1Wave} />} color="green" radius="sm" variant="light">
42-
<Text fw={700} ta="right" mx={6}>
43-
<NumberFormatter prefix="$" value={Money.Cash} thousandSeparator />
43+
<Group h="fit-content" gap={6}>
44+
<Badge size="xl" leftSection={<FontAwesomeIcon size="xl" icon={faMoneyBill1Wave} />} color="green" radius="sm" variant="light">
45+
<Text fz={20} fw={700} ta="right" mx={6} lh={1}>
46+
<NumberFormatter prefix="$" value={Money.Cash} thousandSeparator decimalScale={0} />
4447
</Text>
4548
</Badge>
46-
<Badge size="lg" leftSection={<FontAwesomeIcon size="lg" icon={faCreditCard} />} color="blue" radius="sm" variant="light">
47-
<Text fw={700} ta="right" mx={6}>
48-
<NumberFormatter prefix="$" value={Money.Bank} thousandSeparator />
49+
<Badge size="xl" leftSection={<FontAwesomeIcon size="xl" icon={faCreditCard} />} color="blue" radius="sm" variant="light">
50+
<Text fz={20} fw={700} ta="right" mx={6} lh={1}>
51+
<NumberFormatter prefix="$" value={Money.Bank} thousandSeparator decimalScale={0} />
4952
</Text>
5053
</Badge>
5154
</Group>
@@ -54,11 +57,13 @@ function PlayerData() {
5457

5558
function ShopInterface() {
5659
return (
57-
<Stack h="100%">
58-
<Group w="100%" justify="space-between">
60+
<Stack w="100%" h="100%">
61+
<Group h="auto" w="100%" justify="space-between">
5962
<ShopTitle />
63+
<Group>
6064
<PlayerData />
6165
<CloseButton
66+
size="xl"
6267
onClick={() => {
6368
if (!isEnvBrowser()) fetchNui("hideFrame");
6469
}}

0 commit comments

Comments
 (0)