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
841ea7f8
Unverified
Commit
841ea7f8
authored
Dec 19, 2022
by
Jordan Frankfurt
Committed by
GitHub
Dec 19, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6 from Uniswap/fix-menu-z-index
fix: landing page overlay occlusion of Z_INDEX.dropdown
parents
3e078809
c9908748
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
4 deletions
+12
-4
NavDropdown.css.ts
src/components/NavBar/NavDropdown.css.ts
+0
-1
NavDropdown.tsx
src/components/NavBar/NavDropdown.tsx
+9
-1
index.tsx
src/pages/Landing/index.tsx
+2
-2
zIndex.ts
src/theme/zIndex.ts
+1
-0
No files found.
src/components/NavBar/NavDropdown.css.ts
View file @
841ea7f8
...
@@ -10,7 +10,6 @@ const baseNavDropdown = style([
...
@@ -10,7 +10,6 @@ const baseNavDropdown = style([
borderWidth
:
'
1px
'
,
borderWidth
:
'
1px
'
,
paddingBottom
:
'
8
'
,
paddingBottom
:
'
8
'
,
paddingTop
:
'
8
'
,
paddingTop
:
'
8
'
,
zIndex
:
'
2
'
,
}),
}),
{
{
boxShadow
:
'
0px 4px 12px 0px #00000026
'
,
boxShadow
:
'
0px 4px 12px 0px #00000026
'
,
...
...
src/components/NavBar/NavDropdown.tsx
View file @
841ea7f8
import
{
Box
,
BoxProps
}
from
'
nft/components/Box
'
import
{
Box
,
BoxProps
}
from
'
nft/components/Box
'
import
{
useIsMobile
}
from
'
nft/hooks
'
import
{
useIsMobile
}
from
'
nft/hooks
'
import
{
ForwardedRef
,
forwardRef
}
from
'
react
'
import
{
ForwardedRef
,
forwardRef
}
from
'
react
'
import
{
Z_INDEX
}
from
'
theme/zIndex
'
import
*
as
styles
from
'
./NavDropdown.css
'
import
*
as
styles
from
'
./NavDropdown.css
'
export
const
NavDropdown
=
forwardRef
((
props
:
BoxProps
,
ref
:
ForwardedRef
<
HTMLElement
>
)
=>
{
export
const
NavDropdown
=
forwardRef
((
props
:
BoxProps
,
ref
:
ForwardedRef
<
HTMLElement
>
)
=>
{
const
isMobile
=
useIsMobile
()
const
isMobile
=
useIsMobile
()
return
<
Box
ref=
{
ref
}
className=
{
isMobile
?
styles
.
mobileNavDropdown
:
styles
.
NavDropdown
}
{
...
props
}
/>
return
(
<
Box
ref=
{
ref
}
style=
{
{
zIndex
:
Z_INDEX
.
modal
}
}
className=
{
isMobile
?
styles
.
mobileNavDropdown
:
styles
.
NavDropdown
}
{
...
props
}
/>
)
})
})
NavDropdown
.
displayName
=
'
NavDropdown
'
NavDropdown
.
displayName
=
'
NavDropdown
'
src/pages/Landing/index.tsx
View file @
841ea7f8
...
@@ -32,7 +32,7 @@ const Gradient = styled.div<{ isDarkMode: boolean }>`
...
@@ -32,7 +32,7 @@ const Gradient = styled.div<{ isDarkMode: boolean }>`
isDarkMode
isDarkMode
?
'
linear-gradient(rgba(8, 10, 24, 0) 0%, rgb(8 10 24 / 100%) 45%)
'
?
'
linear-gradient(rgba(8, 10, 24, 0) 0%, rgb(8 10 24 / 100%) 45%)
'
:
'
linear-gradient(rgba(255, 255, 255, 0) 0%, rgb(255 255 255 /100%) 45%)
'
}
;
:
'
linear-gradient(rgba(255, 255, 255, 0) 0%, rgb(255 255 255 /100%) 45%)
'
}
;
z-index:
${
Z_INDEX
.
dropdown
}
;
z-index:
${
Z_INDEX
.
under_
dropdown
}
;
pointer-events: none;
pointer-events: none;
`
`
...
@@ -55,7 +55,7 @@ const ContentContainer = styled.div<{ isDarkMode: boolean }>`
...
@@ -55,7 +55,7 @@ const ContentContainer = styled.div<{ isDarkMode: boolean }>`
max-width: min(720px, 90%);
max-width: min(720px, 90%);
position: sticky;
position: sticky;
bottom: 0;
bottom: 0;
z-index:
${
Z_INDEX
.
dropdown
}
;
z-index:
${
Z_INDEX
.
under_
dropdown
}
;
padding: 32px 0 80px;
padding: 32px 0 80px;
transition:
${({
theme
})
=>
`
${
theme
.
transition
.
duration
.
medium
}
${
theme
.
transition
.
timing
.
ease
}
opacity`
}
;
transition:
${({
theme
})
=>
`
${
theme
.
transition
.
duration
.
medium
}
${
theme
.
transition
.
timing
.
ease
}
opacity`
}
;
...
...
src/theme/zIndex.ts
View file @
841ea7f8
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
export
enum
Z_INDEX
{
export
enum
Z_INDEX
{
deprecated_zero
=
0
,
deprecated_zero
=
0
,
deprecated_content
=
1
,
deprecated_content
=
1
,
under_dropdown
=
990
,
dropdown
=
1000
,
dropdown
=
1000
,
sticky
=
1020
,
sticky
=
1020
,
fixed
=
1030
,
fixed
=
1030
,
...
...
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