Commit 1d5c6530 authored by Moody Salem's avatar Moody Salem

fix(header): some responsive style changes to the header

parent 78f294c3
...@@ -47,8 +47,8 @@ const HeaderElementWrap = styled.div` ...@@ -47,8 +47,8 @@ const HeaderElementWrap = styled.div`
display: flex; display: flex;
align-items: center; align-items: center;
${({ theme }) => theme.mediaWidth.upToExtraSmall` ${({ theme }) => theme.mediaWidth.upToSmall`
margin-top: 0.5rem; margin-top: 0.5rem;
`}; `};
` `
...@@ -98,21 +98,33 @@ const NetworkCard = styled(YellowCard)` ...@@ -98,21 +98,33 @@ const NetworkCard = styled(YellowCard)`
padding: 8px 12px; padding: 8px 12px;
` `
const UniIcon = styled(HistoryLink)<{ to: string }>` const UniIcon = styled.a`
transition: transform 0.3s ease; transition: transform 0.3s ease;
:hover { :hover {
transform: rotate(-5deg); transform: rotate(-5deg);
} }
${({ theme }) => theme.mediaWidth.upToSmall`
img {
width: 4.5rem;
}
`};
` `
const HeaderControls = styled.div` const HeaderControls = styled.div`
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: flex-end; align-items: center;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.mediaWidth.upToSmall`
flex-direction: column; flex-direction: column;
`}; align-items: flex-end;
`};
`
const BalanceText = styled(Text)`
${({ theme }) => theme.mediaWidth.upToExtraSmall`
display: none;
`};
` `
const NETWORK_LABELS: { [chainId in ChainId]: string | null } = { const NETWORK_LABELS: { [chainId in ChainId]: string | null } = {
...@@ -134,7 +146,7 @@ export default function Header() { ...@@ -134,7 +146,7 @@ export default function Header() {
<RowBetween style={{ alignItems: 'flex-start' }} padding="1rem 1rem 0 1rem"> <RowBetween style={{ alignItems: 'flex-start' }} padding="1rem 1rem 0 1rem">
<HeaderElement> <HeaderElement>
<Title> <Title>
<UniIcon id="link" to="/"> <UniIcon id="link" href="/">
<img src={isDark ? LogoDark : Logo} alt="logo" /> <img src={isDark ? LogoDark : Logo} alt="logo" />
</UniIcon> </UniIcon>
{!isMobile && ( {!isMobile && (
...@@ -157,9 +169,9 @@ export default function Header() { ...@@ -157,9 +169,9 @@ export default function Header() {
</TestnetWrapper> </TestnetWrapper>
<AccountElement active={!!account} style={{ pointerEvents: 'auto' }}> <AccountElement active={!!account} style={{ pointerEvents: 'auto' }}>
{account && userEthBalance ? ( {account && userEthBalance ? (
<Text style={{ flexShrink: 0 }} pl="0.75rem" pr="0.5rem" fontWeight={500}> <BalanceText style={{ flexShrink: 0 }} pl="0.75rem" pr="0.5rem" fontWeight={500}>
{userEthBalance?.toSignificant(4)} ETH {userEthBalance?.toSignificant(4)} ETH
</Text> </BalanceText>
) : null} ) : null}
<Web3Status /> <Web3Status />
</AccountElement> </AccountElement>
......
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