diff --git a/examples/components/package.json b/examples/components/package.json
index 9e683397..cee2bb79 100644
--- a/examples/components/package.json
+++ b/examples/components/package.json
@@ -4,10 +4,12 @@
".": "./src/index.ts"
},
"dependencies": {
+ "@radix-ui/react-popover": "^1.0.7",
"typescript": "latest"
},
"peerDependencies": {
"@0xsequence/design-system": "*",
+ "@0xsequence/network": "*",
"wagmi": "*"
}
}
diff --git a/examples/components/src/Header.tsx b/examples/components/src/Header.tsx
index 467bf217..818fc761 100644
--- a/examples/components/src/Header.tsx
+++ b/examples/components/src/Header.tsx
@@ -1,15 +1,34 @@
-import { Box, Image, Text, GradientAvatar, truncateAddress } from '@0xsequence/design-system'
-import { useAccount } from 'wagmi'
+import {
+ Box,
+ Image,
+ Text,
+ GradientAvatar,
+ Select,
+ truncateAddress,
+ NetworkImage,
+ IconButton,
+ CloseIcon,
+ Card,
+ Button,
+ ChevronDownIcon
+} from '@0xsequence/design-system'
+import { ChainId } from '@0xsequence/network'
+import * as PopoverPrimitive from '@radix-ui/react-popover'
+import { useState } from 'react'
+import { useAccount, useChainId, useDisconnect, useSwitchChain } from 'wagmi'
-export const Header = () => {
- const { address, connector } = useAccount()
+const networks = [
+ { chainId: ChainId.ARBITRUM_SEPOLIA, title: 'Arbitrum Sepolia' },
+ { chainId: ChainId.ARBITRUM_NOVA, title: 'Arbitrum Nova' }
+]
+export const Header = () => {
return (
{
disableAnimation
/>
-
-
-
-
-
- {truncateAddress(String(address), 8)}
-
-
-
-
- {connector?.name}
-
-
-
+
+
+
)
}
+
+const AccountMenu = () => {
+ const [isOpen, toggleOpen] = useState(false)
+ const { address, connector } = useAccount()
+ const { disconnect } = useDisconnect()
+
+ return (
+
+
+
+
+
+
+
+
+ {truncateAddress(String(address), 4)}
+
+
+ {/*
+
+ {connector?.name}
+
+ */}
+
+
+
+
+
+
+
+
+
+
+
+ {isOpen && (
+
+
+
+
+
+
+ )}
+
+ )
+}
+
+const NetworkSelect = () => {
+ const chainId = useChainId()
+ const { switchChain } = useSwitchChain()
+
+ return (
+