Skip to content

Commit 7bd899e

Browse files
committed
refactor: ReceivedEther to tailwind
1 parent efd5743 commit 7bd899e

File tree

1 file changed

+8
-21
lines changed

1 file changed

+8
-21
lines changed

src/components/Simulator/screens/SendReceive/ReceivedEther.tsx

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import React, { useEffect, useMemo, useState } from "react"
1+
import { useEffect, useMemo, useState } from "react"
22
import { AnimatePresence, motion } from "framer-motion"
33
import { MdClose, MdInfo } from "react-icons/md"
4-
import { Flex, Icon, Text } from "@chakra-ui/react"
54

65
import type { SimulatorNavProps } from "@/lib/types"
76

@@ -85,32 +84,20 @@ export const ReceivedEther = ({
8584
/>
8685
<AnimatePresence>
8786
{showToast && !hidden && (
88-
<Flex
87+
<motion.div
8988
key="toast"
90-
position="absolute"
91-
inset={4}
92-
top="auto"
93-
bottom={32}
94-
borderRadius="base"
95-
h="fit-content"
96-
bg="primary300"
97-
gap={3}
98-
fontSize="md"
99-
align="center"
100-
p={4}
101-
color="background.base"
102-
as={motion.div}
89+
className="absolute inset-4 bottom-32 top-auto flex h-fit items-center gap-3 rounded bg-primary-high-contrast p-4 text-md text-background"
10390
initial={{ opacity: 0 }}
10491
animate={{ opacity: 1 }}
10592
exit={{ opacity: 0 }}
10693
>
107-
<Icon as={MdInfo} fontSize="xl" />
108-
<Text m={0} fontWeight="bold" fontSize="xs">
94+
<MdInfo className="text-xl" />
95+
<p className="m-0 text-xs font-bold">
10996
You received {displayEth} ETH ({displayUsd})
11097
{sender ? ` from ${sender}` : ""}!
111-
</Text>
112-
<Icon as={MdClose} fontSize="xl" onClick={() => setHidden(true)} />
113-
</Flex>
98+
</p>
99+
<MdClose className="text-xl" onClick={() => setHidden(true)} />
100+
</motion.div>
114101
)}
115102
</AnimatePresence>
116103
</motion.div>

0 commit comments

Comments
 (0)