diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-06-28 07:28:54 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-06-28 07:29:38 +0800 |
commit | cce55857950fc20344c9c93b3047a547039fb406 (patch) | |
tree | b459d7e436e42129af518b1b47ab4c7aef17b8de /packages/website/ts/components/ui | |
parent | 26a9fe912703ef09ca9328ce19847406572386ac (diff) | |
download | dexon-0x-contracts-cce55857950fc20344c9c93b3047a547039fb406.tar dexon-0x-contracts-cce55857950fc20344c9c93b3047a547039fb406.tar.gz dexon-0x-contracts-cce55857950fc20344c9c93b3047a547039fb406.tar.bz2 dexon-0x-contracts-cce55857950fc20344c9c93b3047a547039fb406.tar.lz dexon-0x-contracts-cce55857950fc20344c9c93b3047a547039fb406.tar.xz dexon-0x-contracts-cce55857950fc20344c9c93b3047a547039fb406.tar.zst dexon-0x-contracts-cce55857950fc20344c9c93b3047a547039fb406.zip |
Fix animation when coming from bottom
Diffstat (limited to 'packages/website/ts/components/ui')
-rw-r--r-- | packages/website/ts/components/ui/animation.tsx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/website/ts/components/ui/animation.tsx b/packages/website/ts/components/ui/animation.tsx index b90437721..943e3bf28 100644 --- a/packages/website/ts/components/ui/animation.tsx +++ b/packages/website/ts/components/ui/animation.tsx @@ -25,12 +25,18 @@ const appearFromBottomFrames = keyframes` } `; +const stylesForAnimation: { [K in AnimationType]: string } = { + // Needed for safari + easeUpFromBottom: `position: fixed`, +}; + const animations: { [K in AnimationType]: string } = { easeUpFromBottom: `${appearFromBottomFrames} 1s ease 0s 1 forwards`, }; export const Animation = styled(PlainAnimation)` animation: ${props => animations[props.type]}; + ${props => stylesForAnimation[props.type]}; `; Animation.displayName = 'Animation'; |