Skip to content

Commit 7b666e5

Browse files
feat(Simulator/screens/Browser): migrate to Tailwind
1 parent 86162c7 commit 7b666e5

File tree

1 file changed

+23
-44
lines changed
  • src/components/Simulator/screens/ConnectWeb3

1 file changed

+23
-44
lines changed

src/components/Simulator/screens/ConnectWeb3/Browser.tsx

Lines changed: 23 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
import React, { useEffect, useState } from "react"
1+
import React, { type HTMLAttributes, useEffect, useState } from "react"
22
import { motion } from "framer-motion"
33
import { BsTriangle } from "react-icons/bs"
44
import { IoEllipsisHorizontalSharp } from "react-icons/io5"
55
import { PiMagnifyingGlass } from "react-icons/pi"
66
import { TbWorldWww } from "react-icons/tb"
7-
import { Box, Flex, type FlexProps, Icon, Text } from "@chakra-ui/react"
7+
8+
import { Flex, HStack } from "@/components/ui/flex"
89

910
import { BASE_ANIMATION_DELAY_SEC } from "../../constants"
1011
import { NotificationPopover } from "../../NotificationPopover"
1112

1213
import { EXAMPLE_APP_URL } from "./constants"
1314

14-
type BrowserProps = FlexProps
15+
type BrowserProps = HTMLAttributes<HTMLDivElement>
1516

1617
export const Browser = ({ ...props }: BrowserProps) => {
1718
const [typing, setTyping] = useState(false)
@@ -35,67 +36,45 @@ export const Browser = ({ ...props }: BrowserProps) => {
3536
}
3637

3738
return (
38-
<Flex direction="column" h="full" bg="body.light" {...props}>
39-
<Box bg="background.highlight" w="full" px={3} pt={9} pb={3}>
39+
<Flex className="h-full flex-col bg-body-light" {...props}>
40+
<div className="w-full bg-background-highlight px-3 pb-3 pt-9">
4041
<NotificationPopover
4142
title="Example walkthrough"
4243
content="Try logging into a real app with your wallet when finished here"
4344
>
44-
<Flex
45-
bg="background.base"
46-
borderRadius="base"
47-
px={3}
48-
py={2}
49-
align="center"
50-
color="disabled"
51-
cursor="default"
52-
>
53-
<Box
54-
borderInlineEnd="1px"
55-
borderColor="background.highlight"
56-
flex={1}
57-
>
45+
<HStack className="cursor-default gap-0 rounded bg-background px-3 py-2 text-disabled">
46+
<div className="flex-1 border-e border-background-highlight">
5847
{typing ? (
59-
<Text
60-
as={motion.p}
48+
<motion.p
49+
className="text-body-medium"
6150
variants={sentence}
6251
initial="hidden"
6352
animate="visible"
64-
color="body.medium"
6553
>
6654
{EXAMPLE_APP_URL.split("").map((char, index) => (
6755
<motion.span key={char + "-" + index} variants={letter}>
6856
{char}
6957
</motion.span>
7058
))}
71-
</Text>
59+
</motion.p>
7260
) : (
73-
<Text>Search or enter website</Text>
61+
<p>Search or enter website</p>
7462
)}
75-
</Box>
76-
<Icon as={TbWorldWww} ms={3} />
77-
</Flex>
63+
</div>
64+
<TbWorldWww className="ms-3" />
65+
</HStack>
7866
</NotificationPopover>
79-
</Box>
67+
</div>
8068

81-
<Flex flex={1} justify="center" pt={{ base: 20, md: 24 }}>
82-
<Icon as={TbWorldWww} fontSize="8xl" strokeWidth="1" color="disabled" />
69+
<Flex className="flex-1 justify-center pt-20 md:pt-24">
70+
<TbWorldWww className="stroke-1 text-8xl text-disabled" />
8371
</Flex>
8472

85-
<Flex
86-
bg="background.highlight"
87-
w="full"
88-
px={3}
89-
pb={9}
90-
pt={4}
91-
justify="space-around"
92-
fontSize="xl"
93-
color="disabled"
94-
>
95-
<Icon as={BsTriangle} transform="rotate(-90deg)" />
96-
<Icon as={BsTriangle} transform="rotate(90deg)" />
97-
<Icon as={PiMagnifyingGlass} />
98-
<Icon as={IoEllipsisHorizontalSharp} />
73+
<Flex className="w-full justify-around bg-background-highlight px-3 pb-9 pt-4 text-xl text-disabled">
74+
<BsTriangle className="-rotate-90" />
75+
<BsTriangle className="rotate-90" />
76+
<PiMagnifyingGlass />
77+
<IoEllipsisHorizontalSharp />
9978
</Flex>
10079
</Flex>
10180
)

0 commit comments

Comments
 (0)