Skip to content

Commit 92899ab

Browse files
committed
implement suggestions from design review
1 parent d6b4187 commit 92899ab

File tree

2 files changed

+64
-56
lines changed

2 files changed

+64
-56
lines changed

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

Lines changed: 63 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,85 @@
1-
import React from "react"
2-
import {
3-
Box,
4-
type FlexProps,
5-
Text,
6-
Icon,
7-
Flex,
8-
Grid,
9-
Button,
10-
} from "@chakra-ui/react"
1+
import React, { useEffect, useState } from "react"
2+
import { Box, type FlexProps, Text, Icon, Flex } from "@chakra-ui/react"
113
import { BsTriangle } from "react-icons/bs"
124
import { PiMagnifyingGlass } from "react-icons/pi"
5+
import { TbWorldWww } from "react-icons/tb"
136
import { IoEllipsisHorizontalSharp } from "react-icons/io5"
14-
import { NFTSupportIcon } from "../../../icons/wallets/NFTSupportIcon"
7+
import { motion } from "framer-motion"
158
import { NotificationPopover } from "../../NotificationPopover"
9+
import { EXAMPLE_APP_URL } from "./constants"
1610

1711
interface IProps extends FlexProps {
1812
progressStepper: () => void
1913
}
2014
export const Browser: React.FC<IProps> = ({ progressStepper, ...props }) => {
15+
const [typing, setTyping] = useState(false)
16+
useEffect(() => {
17+
const timeout = setTimeout(() => {
18+
setTyping(true)
19+
}, 3000)
20+
return () => clearTimeout(timeout)
21+
}, [])
22+
23+
const sentence = {
24+
hidden: { opacity: 1 },
25+
visible: {
26+
opacity: 1,
27+
transition: { staggerChildren: 0.12 },
28+
},
29+
}
30+
const letter = {
31+
hidden: { opacity: 0 },
32+
visible: { opacity: 1, transition: { duration: 0 } },
33+
}
34+
2135
return (
2236
<Flex direction="column" h="full" bg="body.light" {...props}>
2337
<Box bg="background.highlight" w="full" px={3} pt={9} pb={3}>
2438
<NotificationPopover
2539
title="Example walkthrough"
2640
content="Try logging into a real app with your wallet when finished here"
2741
>
28-
<Box bg="background.base" w="full" borderRadius="base" px={3} py={2}>
29-
<Text color="disabled" cursor="default">
30-
Search or enter address
31-
</Text>
32-
</Box>
33-
</NotificationPopover>
34-
</Box>
35-
<Box p={8} flex={1}>
36-
<Button
37-
variant="ghost"
38-
display="flex"
39-
flexDirection="column"
40-
alignItems="center"
41-
data-group
42-
onClick={progressStepper}
43-
gap={4}
44-
p={0}
45-
>
46-
<Grid
47-
bg="background.highlight"
48-
borderRadius="lg"
49-
placeItems="center"
50-
w={16}
51-
h={16}
52-
_groupHover={{ bg: "primary.hover" }}
42+
<Flex
43+
bg="background.base"
44+
borderRadius="base"
45+
px={3}
46+
py={2}
47+
align="center"
48+
color="disabled"
49+
cursor="default"
5350
>
54-
<Icon
55-
as={NFTSupportIcon}
56-
color="body.base"
57-
w={10}
58-
h={10}
59-
_groupHover={{ color: "background.base" }}
60-
/>
61-
</Grid>
62-
<Box position="relative">
63-
<Text
64-
fontWeight="bold"
65-
color="body.base"
66-
textAlign="center"
67-
m={0}
68-
_groupHover={{ color: "primary.hover" }}
51+
<Box
52+
borderInlineEnd="1px"
53+
borderColor="background.highlight"
54+
flex={1}
6955
>
70-
NFT Market
71-
</Text>
72-
</Box>
73-
</Button>
56+
{typing ? (
57+
<Text
58+
as={motion.p}
59+
variants={sentence}
60+
initial="hidden"
61+
animate="visible"
62+
color="body.medium"
63+
>
64+
{EXAMPLE_APP_URL.split("").map((char, index) => (
65+
<motion.span key={char + "-" + index} variants={letter}>
66+
{char}
67+
</motion.span>
68+
))}
69+
</Text>
70+
) : (
71+
<Text>Search or enter website</Text>
72+
)}
73+
</Box>
74+
<Icon as={TbWorldWww} ms={3} />
75+
</Flex>
76+
</NotificationPopover>
7477
</Box>
78+
79+
<Flex flex={1} justify="center" pt={{ base: 20, md: 24 }}>
80+
<Icon as={TbWorldWww} fontSize="8xl" strokeWidth="1" color="disabled" />
81+
</Flex>
82+
7583
<Flex
7684
bg="background.highlight"
7785
w="full"

src/data/WalletSimulatorData.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ export const walletOnboardingSimData: SimulatorData = {
432432
},
433433
],
434434
ctaLabels: [
435-
"Go to web app",
435+
"Visit NFT market",
436436
"Connect wallet",
437437
"Connect to app",
438438
"Go to account",

0 commit comments

Comments
 (0)