Commit bdeb62ad authored by Vignesh Mohankumar's avatar Vignesh Mohankumar Committed by GitHub

fix: center NetworkSelector circles (#3867)

center NetworkSelector circles
parent e42effdb
...@@ -93,6 +93,13 @@ const FlyoutRowActiveIndicator = styled.div` ...@@ -93,6 +93,13 @@ const FlyoutRowActiveIndicator = styled.div`
height: 9px; height: 9px;
width: 9px; width: 9px;
` `
const CircleContainer = styled.div`
width: 20px;
display: flex;
justify-content: center;
`
const LinkOutCircle = styled(ArrowDownCircle)` const LinkOutCircle = styled(ArrowDownCircle)`
transform: rotate(230deg); transform: rotate(230deg);
width: 16px; width: 16px;
...@@ -188,7 +195,11 @@ function Row({ ...@@ -188,7 +195,11 @@ function Row({
<FlyoutRow onClick={() => onSelectChain(targetChain)} active={active}> <FlyoutRow onClick={() => onSelectChain(targetChain)} active={active}>
<Logo src={logoUrl} /> <Logo src={logoUrl} />
<NetworkLabel>{label}</NetworkLabel> <NetworkLabel>{label}</NetworkLabel>
{chainId === targetChain && <FlyoutRowActiveIndicator />} {chainId === targetChain && (
<CircleContainer>
<FlyoutRowActiveIndicator />
</CircleContainer>
)}
</FlyoutRow> </FlyoutRow>
) )
...@@ -197,21 +208,30 @@ function Row({ ...@@ -197,21 +208,30 @@ function Row({
<ActiveRowWrapper> <ActiveRowWrapper>
{rowContent} {rowContent}
<ActiveRowLinkList> <ActiveRowLinkList>
{bridge ? ( {bridge && (
<ExternalLink href={bridge}> <ExternalLink href={bridge}>
<BridgeLabel chainId={chainId} /> <LinkOutCircle /> <BridgeLabel chainId={chainId} />
<CircleContainer>
<LinkOutCircle />
</CircleContainer>
</ExternalLink> </ExternalLink>
) : null} )}
{explorer ? ( {explorer && (
<ExternalLink href={explorer}> <ExternalLink href={explorer}>
<ExplorerLabel chainId={chainId} /> <LinkOutCircle /> <ExplorerLabel chainId={chainId} />
<CircleContainer>
<LinkOutCircle />
</CircleContainer>
</ExternalLink> </ExternalLink>
) : null} )}
{helpCenterUrl ? ( {helpCenterUrl && (
<ExternalLink href={helpCenterUrl}> <ExternalLink href={helpCenterUrl}>
<Trans>Help Center</Trans> <LinkOutCircle /> <Trans>Help Center</Trans>
<CircleContainer>
<LinkOutCircle />
</CircleContainer>
</ExternalLink> </ExternalLink>
) : null} )}
</ActiveRowLinkList> </ActiveRowLinkList>
</ActiveRowWrapper> </ActiveRowWrapper>
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment