@@ -21,23 +21,18 @@ const ChainSelector = () => {
2121 const chainConfig = useChain ( ) ;
2222 const isLargeScreen = useMediaQuery ( `(min-width: ${ BREAKPOINTS . sm } )` ) ;
2323 const { switchNetwork } = useAppKitNetwork ( ) ;
24- const isSelectedChainTestnet = testnet . some ( c => c . id === chainConfig ?. id ) ;
2524
26- const renderOption = ( chain : Definition ) => {
27- const isTestnet = testnet . some ( c => c . id === chain . id ) ;
28-
29- return {
30- onClick : ( ) => void switchNetwork ( chain ) ,
31- text :
25+ const renderOption = ( chain : Definition ) => ( {
26+ onClick : ( ) => void switchNetwork ( chain ) ,
27+ text :
3228 (
3329 < Option >
34- < ChainIcon size = { 20 } chainId = { chain . id } isTestnet = { isTestnet } />
30+ < ChainIcon size = { 20 } chainId = { chain . id } />
3531 < p > { chain . name } </ p >
3632 { chainConfig ?. id === chain . id && < CIcon size = { 20 } icon = "CheckmarkRegular" /> }
3733 </ Option >
3834 ) ,
39- } ;
40- } ;
35+ } ) ;
4136
4237 return (
4338 < StyledSelectBox
@@ -50,24 +45,21 @@ const ChainSelector = () => {
5045 < StyledButton variant = "secondary" >
5146 { chainConfig ? (
5247 < ButtonLeftContent >
53- < ChainIcon chainId = { chainConfig . id } size = { 24 } isTestnet = { isSelectedChainTestnet } />
48+ < ChainIcon chainId = { chainConfig . id } size = { 24 } />
5449 { isLargeScreen && chainConfig . name }
5550 </ ButtonLeftContent >
5651 ) : (
5752 'Select Network'
5853 ) }
59- < ChevronIcon icon = "ChevronLeft" />
54+ < CIcon icon = "Chevron" color = { vars ( '--color-neutral-foreground-3-rest' ) } />
55+ < UnderLine />
6056 </ StyledButton >
6157 </ StyledSelectBox >
6258 ) ;
6359} ;
6460
6561export default ChainSelector ;
6662
67- const ChevronIcon = styled ( CIcon ) `
68- transform: rotate(180deg);
69- ` ;
70-
7163const ButtonLeftContent = styled . div `
7264 display: flex;
7365 align-items: center;
@@ -81,6 +73,8 @@ const StyledSelectBox = styled(SelectBox)`
8173const StyledButton = styled ( Button ) `
8274 display: flex;
8375
76+ position: relative;
77+
8478 align-items: center;
8579 justify-content: space-between;
8680 gap: ${ vars ( '--spacing-s' ) } ;
@@ -90,6 +84,7 @@ const StyledButton = styled(Button)`
9084
9185 background: ${ vars ( '--color-neutral-background-1-rest' ) } ;
9286 border-color: ${ vars ( '--color-neutral-stroke-2-rest' ) } ;
87+ overflow: hidden;
9388
9489 ${ typography . web . body1 } ;
9590
@@ -110,3 +105,14 @@ const Option = styled.div`
110105 margin-left: auto;
111106 }
112107` ;
108+
109+ const UnderLine = styled . div `
110+ position: absolute;
111+ left: 0;
112+ bottom: 0;
113+
114+ height: 1px;
115+ width: 100%;
116+
117+ background: ${ vars ( '--color-neutral-stroke-2-rest' ) } ;
118+ ` ;
0 commit comments