diff --git a/src/components/Simulator/screens/ConnectWeb3/Browser.tsx b/src/components/Simulator/screens/ConnectWeb3/Browser.tsx
index be8d5259425..0738d499162 100644
--- a/src/components/Simulator/screens/ConnectWeb3/Browser.tsx
+++ b/src/components/Simulator/screens/ConnectWeb3/Browser.tsx
@@ -1,17 +1,18 @@
-import React, { useEffect, useState } from "react"
+import React, { type HTMLAttributes, useEffect, useState } from "react"
import { motion } from "framer-motion"
import { BsTriangle } from "react-icons/bs"
import { IoEllipsisHorizontalSharp } from "react-icons/io5"
import { PiMagnifyingGlass } from "react-icons/pi"
import { TbWorldWww } from "react-icons/tb"
-import { Box, Flex, type FlexProps, Icon, Text } from "@chakra-ui/react"
+
+import { Flex, HStack } from "@/components/ui/flex"
import { BASE_ANIMATION_DELAY_SEC } from "../../constants"
import { NotificationPopover } from "../../NotificationPopover"
import { EXAMPLE_APP_URL } from "./constants"
-type BrowserProps = FlexProps
+type BrowserProps = HTMLAttributes
export const Browser = ({ ...props }: BrowserProps) => {
const [typing, setTyping] = useState(false)
@@ -35,67 +36,45 @@ export const Browser = ({ ...props }: BrowserProps) => {
}
return (
-
-
+
+
-
-
+
+
{typing ? (
-
{EXAMPLE_APP_URL.split("").map((char, index) => (
{char}
))}
-
+
) : (
-
Search or enter website
+
Search or enter website
)}
-
-
-
+
+
+
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
)
diff --git a/src/components/Simulator/screens/ConnectWeb3/Slider.tsx b/src/components/Simulator/screens/ConnectWeb3/Slider.tsx
index 998ea050b11..99ab4418a05 100644
--- a/src/components/Simulator/screens/ConnectWeb3/Slider.tsx
+++ b/src/components/Simulator/screens/ConnectWeb3/Slider.tsx
@@ -1,61 +1,45 @@
-import React from "react"
+import { type ReactNode } from "react"
import { motion } from "framer-motion"
import { PiCheckThin } from "react-icons/pi"
-import { Box, Flex, Grid, Icon, Text, TextProps } from "@chakra-ui/react"
+
+import { HStack, VStack } from "@/components/ui/flex"
import { EthGlyphIcon } from "../../icons"
-type SliderProps = Pick & {
+type SliderProps = {
isConnected: boolean
displayUrl: string
+ children: ReactNode
}
export const Slider = ({ isConnected, displayUrl, children }: SliderProps) => {
- const ICON_SIZE = "4.5rem" as const
return (
<>
-
-
+
{isConnected ? (
-
+
-
+
{
animate={{ opacity: 1 }}
transition={{ delay: 0.15 }}
>
-
+
You're logged in!
-
+
-
+
) : (
<>
-
+
Connect account?
-
+
{/* URL Pill */}
-
-
-
-
-
- {displayUrl}
-
-
+
+
+ {/* TODO: Remove important flags and `size` class when icon is migrated */}
+
+
+ {displayUrl}
+
{/* Information */}
- {children}
+ {children}
>
)}
-
+
>
)
diff --git a/src/components/Simulator/screens/ConnectWeb3/Web3App.tsx b/src/components/Simulator/screens/ConnectWeb3/Web3App.tsx
index 7d11b6c0550..428ceeefe4f 100644
--- a/src/components/Simulator/screens/ConnectWeb3/Web3App.tsx
+++ b/src/components/Simulator/screens/ConnectWeb3/Web3App.tsx
@@ -1,19 +1,15 @@
-import React from "react"
+import React, { type HTMLAttributes } from "react"
import { GrMenu } from "react-icons/gr"
-import {
- Box,
- type BoxProps,
- Flex,
- Icon,
- Text,
- useColorModeValue,
-} from "@chakra-ui/react"
+
+import { HStack } from "@/components/ui/flex"
+
+import { cn } from "@/lib/utils/cn"
import { FAKE_DEMO_ADDRESS } from "../../constants"
import { EthGlyphIcon } from "../../icons"
import { NotificationPopover } from "../../NotificationPopover"
-type Web3AppProps = BoxProps & {
+type Web3AppProps = HTMLAttributes & {
displayUrl: string
appName?: string
}
@@ -21,37 +17,36 @@ export const Web3App = ({
displayUrl,
appName,
children,
- ...boxProps
+ className,
+ ...rest
}: Web3AppProps) => {
- const bg = useColorModeValue("#e8e8e8", "#171717")
-
return (
-
-
-
- {displayUrl}
-
-
+
+
-
-
-
+
+ {/* TODO: Remove 'size' class when icon is migrated */}
+
+
{appName && (
<>
-
- {appName}
-
-
{FAKE_DEMO_ADDRESS}
+
{appName}
+
{FAKE_DEMO_ADDRESS}
>
)}
-
-
-
+
+
+
{children}
-
+
)
}
diff --git a/src/components/Simulator/screens/ConnectWeb3/__stories__/ConnectWeb3.stories.tsx b/src/components/Simulator/screens/ConnectWeb3/__stories__/ConnectWeb3.stories.tsx
new file mode 100644
index 00000000000..2d24c60928e
--- /dev/null
+++ b/src/components/Simulator/screens/ConnectWeb3/__stories__/ConnectWeb3.stories.tsx
@@ -0,0 +1,71 @@
+import type { Meta, StoryObj } from "@storybook/react/*"
+import { fn } from "@storybook/test"
+
+import { Phone } from "@/components/Simulator/Phone"
+import { Template } from "@/components/Simulator/Template"
+
+import { ConnectWeb3 as Component } from "../"
+
+const meta = {
+ title: "Molecules / Display Content / Simulator / ConnectWeb3 Screen",
+ component: Component,
+ parameters: {
+ layout: "fullscreen",
+ },
+ decorators: [
+ (Story) => (
+
+ ),
+ ],
+ args: {
+ nav: {
+ progressStepper: fn(),
+ step: 0,
+ openPath: fn(),
+ regressStepper: fn(),
+ totalSteps: 3,
+ },
+ ctaLabel: "Visit NFT market",
+ },
+} satisfies Meta
+
+export default meta
+
+type Story = StoryObj
+
+export const Initial: Story = {}
+
+export const SliderNotConnected: Story = {
+ args: {
+ nav: {
+ ...meta.args.nav,
+ step: 2,
+ },
+ ctaLabel: "Connect to app",
+ },
+}
+
+export const SliderConnected: Story = {
+ args: {
+ nav: {
+ ...meta.args.nav,
+ step: 3,
+ },
+ ctaLabel: "Go to account",
+ },
+}
+export const Account: Story = {
+ args: {
+ nav: {
+ ...meta.args.nav,
+ step: 4,
+ },
+ ctaLabel: "Finished",
+ },
+}
diff --git a/src/components/Simulator/screens/ConnectWeb3/index.tsx b/src/components/Simulator/screens/ConnectWeb3/index.tsx
index 4a83ea00c40..8267e9b7ac5 100644
--- a/src/components/Simulator/screens/ConnectWeb3/index.tsx
+++ b/src/components/Simulator/screens/ConnectWeb3/index.tsx
@@ -1,15 +1,16 @@
-import React, { useEffect, useMemo, useState } from "react"
+import { useEffect, useMemo, useState } from "react"
import { AnimatePresence, motion } from "framer-motion"
import {
RiAuctionLine,
RiFileTransferLine,
RiPriceTag2Line,
} from "react-icons/ri"
-import { Box, Button, Flex, Icon, Text } from "@chakra-ui/react"
import type { PhoneScreenProps } from "@/lib/types"
-import { Image } from "@/components/Image"
+import { TwImage as Image } from "@/components/Image"
+import { Button } from "@/components/ui/buttons/Button"
+import { Flex } from "@/components/ui/flex"
import { useEthPrice } from "../../../../hooks/useEthPrice"
import {
@@ -80,36 +81,17 @@ export const ConnectWeb3 = ({ nav, ctaLabel }: PhoneScreenProps) => {
{[0].includes(step) && }
{[1, 2, 3].includes(step) && (
-
-
+
Welcome to Web3
-
- NFT Marketplace
-
-
-
+ NFT Marketplace
+
+
Connect your wallet to view your collection
-
+
)}
@@ -128,20 +110,13 @@ export const ConnectWeb3 = ({ nav, ctaLabel }: PhoneScreenProps) => {
style={{ height: "100%" }}
>
-
-
- Your collection (1)
-
-
+
+
Your collection (1)
+
{
content="These are some things you could do as the owner of your NFTs"
side="top"
>
-
-
- Cool art
-
- }
- >
+
+ Cool art
+
- }
- >
+
- }
- >
+
@@ -192,16 +150,16 @@ export const ConnectWeb3 = ({ nav, ctaLabel }: PhoneScreenProps) => {
content="Try out a real Ethereum application when finished here"
side="top"
>
-
-
+
)}
diff --git a/src/components/ui/buttons/Button.tsx b/src/components/ui/buttons/Button.tsx
index 3b71e28a986..1072007ec4c 100644
--- a/src/components/ui/buttons/Button.tsx
+++ b/src/components/ui/buttons/Button.tsx
@@ -36,7 +36,7 @@ const buttonVariants = cva(
),
outline: "", // Base styling
ghost: "border-transparent hover:shadow-none",
- link: "border-transparent hover:shadow-none underline py-0 px-1 active:text-primary",
+ link: "border-transparent hover:shadow-none underline !min-h-0 !py-0 !px-1 active:text-primary",
},
size: {
lg: "text-lg py-3 px-8 [&>svg]:text-2xl rounded-lg focus-visible:rounded-lg",