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
fb05439d
Unverified
Commit
fb05439d
authored
Mar 30, 2023
by
eddie
Committed by
GitHub
Mar 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: mini portfolio layout fixes (#6260)
* fix: mini portfolio layout fixes * feat: refactor MP drawer CSS
parent
fb7eade7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
17 deletions
+16
-17
AuthenticatedHeader.tsx
src/components/WalletDropdown/AuthenticatedHeader.tsx
+1
-1
index.tsx
src/components/WalletDropdown/index.tsx
+15
-16
No files found.
src/components/WalletDropdown/AuthenticatedHeader.tsx
View file @
fb05439d
...
@@ -36,7 +36,7 @@ import MiniPortfolio from './MiniPortfolio'
...
@@ -36,7 +36,7 @@ import MiniPortfolio from './MiniPortfolio'
import
{
portfolioFadeInAnimation
}
from
'
./MiniPortfolio/PortfolioRow
'
import
{
portfolioFadeInAnimation
}
from
'
./MiniPortfolio/PortfolioRow
'
const
AuthenticatedHeaderWrapper
=
styled
.
div
`
const
AuthenticatedHeaderWrapper
=
styled
.
div
`
padding:
14px 12px 16
px 16px;
padding:
20
px 16px;
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
flex: 1;
flex: 1;
...
...
src/components/WalletDropdown/index.tsx
View file @
fb05439d
...
@@ -76,16 +76,22 @@ const WalletDropdownScrollWrapper = styled.div`
...
@@ -76,16 +76,22 @@ const WalletDropdownScrollWrapper = styled.div`
border-radius: 12px;
border-radius: 12px;
`
`
const
WalletDropdownWrapper
=
styled
.
div
<
{
open
:
boolean
}
>
`
const
Wrapper
=
styled
.
div
`
display: flex;
flex-direction: row;
height: calc(100% - 2 *
${
DRAWER_MARGIN
}
);
overflow: hidden;
position: fixed;
position: fixed;
right:
${
DRAWER_MARGIN
}
;
top:
${
DRAWER_MARGIN
}
;
top:
${
DRAWER_MARGIN
}
;
right:
${({
open
})
=>
(
open
?
DRAWER_MARGIN
:
'
-
'
+
DRAWER_WIDTH
)}
;
z-index:
${
Z_INDEX
.
fixed
}
;
z-index:
${
Z_INDEX
.
fixed
}
;
`
const
WalletDropdownWrapper
=
styled
.
div
<
{
open
:
boolean
}
>
`
margin-right:
${({
open
})
=>
(
open
?
0
:
'
-
'
+
DRAWER_WIDTH
)}
;
height: 100%;
overflow: hidden;
overflow: hidden;
height: calc(100% - 2 *
${
DRAWER_MARGIN
}
);
@media only screen and (max-width:
${({
theme
})
=>
`
${
theme
.
breakpoint
.
sm
}
px`
}
) {
@media only screen and (max-width:
${({
theme
})
=>
`
${
theme
.
breakpoint
.
sm
}
px`
}
) {
z-index:
${
Z_INDEX
.
modal
}
;
z-index:
${
Z_INDEX
.
modal
}
;
top: unset;
top: unset;
...
@@ -101,7 +107,7 @@ const WalletDropdownWrapper = styled.div<{ open: boolean }>`
...
@@ -101,7 +107,7 @@ const WalletDropdownWrapper = styled.div<{ open: boolean }>`
}
}
@media screen and (min-width: 1440px) {
@media screen and (min-width: 1440px) {
right:
${({
open
})
=>
(
open
?
DRAWER_MARGIN
:
'
-
'
+
DRAWER_WIDTH_XL
)}
;
margin-right:
${({
open
})
=>
(
open
?
0
:
'
-
'
+
DRAWER_WIDTH_XL
)}
;
width:
${
DRAWER_WIDTH_XL
}
;
width:
${
DRAWER_WIDTH_XL
}
;
}
}
...
@@ -112,7 +118,7 @@ const WalletDropdownWrapper = styled.div<{ open: boolean }>`
...
@@ -112,7 +118,7 @@ const WalletDropdownWrapper = styled.div<{ open: boolean }>`
border:
${({
theme
})
=>
`1px solid
${
theme
.
backgroundOutline
}
`
}
;
border:
${({
theme
})
=>
`1px solid
${
theme
.
backgroundOutline
}
`
}
;
box-shadow:
${({
theme
})
=>
theme
.
deepShadow
}
;
box-shadow:
${({
theme
})
=>
theme
.
deepShadow
}
;
transition: right
${({
theme
})
=>
theme
.
transition
.
duration
.
medium
}
,
transition:
margin-
right
${({
theme
})
=>
theme
.
transition
.
duration
.
medium
}
,
bottom
${({
theme
})
=>
theme
.
transition
.
duration
.
medium
}
;
bottom
${({
theme
})
=>
theme
.
transition
.
duration
.
medium
}
;
`
`
...
@@ -123,11 +129,7 @@ const CloseIcon = styled(ChevronsRight).attrs({ size: 24 })`
...
@@ -123,11 +129,7 @@ const CloseIcon = styled(ChevronsRight).attrs({ size: 24 })`
const
CloseDrawer
=
styled
.
div
`
const
CloseDrawer
=
styled
.
div
`
${
ClickableStyle
}
${
ClickableStyle
}
cursor: pointer;
cursor: pointer;
height: calc(100% - 2 *
${
DRAWER_MARGIN
}
);
height: 100%;
position: fixed;
right: calc(
${
DRAWER_MARGIN
}
+
${
DRAWER_WIDTH
}
-
${
DRAWER_OFFSET
}
);
top: 4px;
z-index:
${
Z_INDEX
.
dropdown
}
;
// When the drawer is not hovered, the icon should be 18px from the edge of the sidebar.
// When the drawer is not hovered, the icon should be 18px from the edge of the sidebar.
padding: 24px calc(18px +
${
DRAWER_OFFSET
}
) 24px 14px;
padding: 24px calc(18px +
${
DRAWER_OFFSET
}
) 24px 14px;
border-radius: 20px 0 0 20px;
border-radius: 20px 0 0 20px;
...
@@ -140,9 +142,6 @@ const CloseDrawer = styled.div`
...
@@ -140,9 +142,6 @@ const CloseDrawer = styled.div`
@media only screen and (max-width:
${({
theme
})
=>
`
${
theme
.
breakpoint
.
sm
}
px`
}
) {
@media only screen and (max-width:
${({
theme
})
=>
`
${
theme
.
breakpoint
.
sm
}
px`
}
) {
display: none;
display: none;
}
}
@media screen and (min-width: 1440px) {
right: calc(
${
DRAWER_MARGIN
}
+
${
DRAWER_WIDTH_XL
}
-
${
DRAWER_OFFSET
}
);
}
`
`
function
WalletDropdown
()
{
function
WalletDropdown
()
{
...
@@ -187,7 +186,7 @@ function WalletDropdown() {
...
@@ -187,7 +186,7 @@ function WalletDropdown() {
},
[
walletDrawerOpen
,
toggleWalletDrawer
])
},
[
walletDrawerOpen
,
toggleWalletDrawer
])
return
(
return
(
<>
<
Wrapper
>
{
walletDrawerOpen
&&
(
{
walletDrawerOpen
&&
(
<
TraceEvent
<
TraceEvent
events=
{
[
BrowserEvent
.
onClick
]
}
events=
{
[
BrowserEvent
.
onClick
]
}
...
@@ -206,7 +205,7 @@ function WalletDropdown() {
...
@@ -206,7 +205,7 @@ function WalletDropdown() {
<
DefaultMenu
/>
<
DefaultMenu
/>
</
WalletDropdownScrollWrapper
>
</
WalletDropdownScrollWrapper
>
</
WalletDropdownWrapper
>
</
WalletDropdownWrapper
>
</>
</
Wrapper
>
)
)
}
}
...
...
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