Skip to content

Commit 3bdb0eb

Browse files
feat(Simulator/WalletHome/WalletBalance): migrate to Tailwind
1 parent c0a9e20 commit 3bdb0eb

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed
Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,28 @@
11
import React from "react"
2-
import { Box, type BoxProps, Flex, Text } from "@chakra-ui/react"
2+
3+
import { Flex } from "@/components/ui/flex"
34

45
import { getMaxFractionDigitsUsd } from "../utils"
56

67
import { AddressPill } from "./AddressPill"
78

8-
type WalletBalanceProps = BoxProps & {
9+
type WalletBalanceProps = {
910
usdAmount?: number
1011
}
1112

12-
export const WalletBalance = ({
13-
usdAmount = 0,
14-
...boxProps
15-
}: WalletBalanceProps) => (
16-
<Box zIndex={1} {...boxProps}>
17-
<Text textAlign="center" color="body.medium" mb={{ base: 2, md: 4 }}>
18-
Your total
19-
</Text>
20-
<Text
21-
textAlign="center"
22-
fontSize={{ base: "3xl", md: "5xl" }}
23-
fontWeight="bold"
24-
>
13+
export const WalletBalance = ({ usdAmount = 0 }: WalletBalanceProps) => (
14+
<div className="z-[1]">
15+
<p className="mb-2 text-center text-body-medium md:mb-4">Your total</p>
16+
<p className="text-center text-3xl font-bold !leading-base md:text-5xl">
2517
{Intl.NumberFormat("en-US", {
2618
style: "currency",
2719
currency: "USD",
2820
notation: "compact",
2921
maximumFractionDigits: getMaxFractionDigitsUsd(usdAmount),
3022
}).format(usdAmount)}
31-
</Text>
32-
<Flex justify="center" mb={4}>
23+
</p>
24+
<Flex className="mb-4 justify-center">
3325
<AddressPill />
3426
</Flex>
35-
</Box>
27+
</div>
3628
)

0 commit comments

Comments
 (0)