File tree Expand file tree Collapse file tree 1 file changed +4
-24
lines changed Expand file tree Collapse file tree 1 file changed +4
-24
lines changed Original file line number Diff line number Diff line change @@ -2,36 +2,16 @@ import { Placement } from '@popperjs/core'
22import { transparentize } from 'polished'
33import React , { useState } from 'react'
44import { usePopper } from 'react-popper'
5- import styled , { keyframes } from 'styled-components'
5+ import styled from 'styled-components'
66import useInterval from '../../hooks/useInterval'
77import Portal from '@reach/portal'
88
9- const fadeIn = keyframes `
10- from {
11- opacity : 0;
12- }
13-
14- to {
15- opacity : 1;
16- }
17- `
18-
19- const fadeOut = keyframes `
20- from {
21- opacity : 1;
22- }
23-
24- to {
25- opacity : 0;
26- }
27- `
28-
299const PopoverContainer = styled . div < { show : boolean } > `
3010 z-index: 9999;
3111
32- visibility: ${ props => ( ! props . show ? 'hidden ' : 'visible ' ) } ;
33- animation : ${ props => ( ! props . show ? fadeOut : fadeIn ) } 150ms linear ;
34- transition: visibility 150ms linear;
12+ visibility: ${ props => ( props . show ? 'visible ' : 'hidden ' ) } ;
13+ opacity : ${ props => ( props . show ? 1 : 0 ) } ;
14+ transition: visibility 150ms linear, opacity 150ms linear ;
3515
3616 background: ${ ( { theme } ) => theme . bg2 } ;
3717 border: 1px solid ${ ( { theme } ) => theme . bg3 } ;
You can’t perform that action at this time.
0 commit comments