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
69818ace
Unverified
Commit
69818ace
authored
Jun 28, 2020
by
Moody Salem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(popover): animation getting stuck open on firefox
parent
42906d67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
24 deletions
+4
-24
index.tsx
src/components/Popover/index.tsx
+4
-24
No files found.
src/components/Popover/index.tsx
View file @
69818ace
...
@@ -2,36 +2,16 @@ import { Placement } from '@popperjs/core'
...
@@ -2,36 +2,16 @@ import { Placement } from '@popperjs/core'
import
{
transparentize
}
from
'
polished
'
import
{
transparentize
}
from
'
polished
'
import
React
,
{
useState
}
from
'
react
'
import
React
,
{
useState
}
from
'
react
'
import
{
usePopper
}
from
'
react-popper
'
import
{
usePopper
}
from
'
react-popper
'
import
styled
,
{
keyframes
}
from
'
styled-components
'
import
styled
from
'
styled-components
'
import
useInterval
from
'
../../hooks/useInterval
'
import
useInterval
from
'
../../hooks/useInterval
'
import
Portal
from
'
@reach/portal
'
import
Portal
from
'
@reach/portal
'
const
fadeIn
=
keyframes
`
from {
opacity : 0;
}
to {
opacity : 1;
}
`
const
fadeOut
=
keyframes
`
from {
opacity : 1;
}
to {
opacity : 0;
}
`
const
PopoverContainer
=
styled
.
div
<
{
show
:
boolean
}
>
`
const
PopoverContainer
=
styled
.
div
<
{
show
:
boolean
}
>
`
z-index: 9999;
z-index: 9999;
visibility:
${
props
=>
(
!
props
.
show
?
'
hidden
'
:
'
visible
'
)}
;
visibility:
${
props
=>
(
props
.
show
?
'
visible
'
:
'
hidden
'
)}
;
animation:
${
props
=>
(
!
props
.
show
?
fadeOut
:
fadeIn
)}
150ms linear
;
opacity:
${
props
=>
(
props
.
show
?
1
:
0
)}
;
transition: visibility 150ms linear;
transition: visibility 150ms linear
, opacity 150ms linear
;
background:
${({
theme
})
=>
theme
.
bg2
}
;
background:
${({
theme
})
=>
theme
.
bg2
}
;
border: 1px solid
${({
theme
})
=>
theme
.
bg3
}
;
border: 1px solid
${({
theme
})
=>
theme
.
bg3
}
;
...
...
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