Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
1d5c6530
Unverified
Commit
1d5c6530
authored
Jul 12, 2020
by
Moody Salem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(header): some responsive style changes to the header
parent
78f294c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
8 deletions
+20
-8
index.tsx
src/components/Header/index.tsx
+20
-8
No files found.
src/components/Header/index.tsx
View file @
1d5c6530
...
@@ -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
.
upTo
Extra
Small
`
${({
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
}
>
<
Balance
Text
style=
{
{
flexShrink
:
0
}
}
pl=
"0.75rem"
pr=
"0.5rem"
fontWeight=
{
500
}
>
{
userEthBalance
?.
toSignificant
(
4
)
}
ETH
{
userEthBalance
?.
toSignificant
(
4
)
}
ETH
</
Text
>
</
Balance
Text
>
)
:
null
}
)
:
null
}
<
Web3Status
/>
<
Web3Status
/>
</
AccountElement
>
</
AccountElement
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment