diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-10-20 04:34:42 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-10-20 04:34:42 +0800 |
commit | 43ad2fe23bec01b077f5c55a23736fdcb24781a3 (patch) | |
tree | 63dea58b4338f0c19f1428ac8221cf3c21caa882 /packages/instant/src/components | |
parent | 100f446031e84c367f1d0852ef60fd04d4544b9f (diff) | |
download | dexon-sol-tools-43ad2fe23bec01b077f5c55a23736fdcb24781a3.tar dexon-sol-tools-43ad2fe23bec01b077f5c55a23736fdcb24781a3.tar.gz dexon-sol-tools-43ad2fe23bec01b077f5c55a23736fdcb24781a3.tar.bz2 dexon-sol-tools-43ad2fe23bec01b077f5c55a23736fdcb24781a3.tar.lz dexon-sol-tools-43ad2fe23bec01b077f5c55a23736fdcb24781a3.tar.xz dexon-sol-tools-43ad2fe23bec01b077f5c55a23736fdcb24781a3.tar.zst dexon-sol-tools-43ad2fe23bec01b077f5c55a23736fdcb24781a3.zip |
feat: upgrade to styled-components v4
Diffstat (limited to 'packages/instant/src/components')
-rw-r--r-- | packages/instant/src/components/animations/slide_animations.tsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/instant/src/components/animations/slide_animations.tsx b/packages/instant/src/components/animations/slide_animations.tsx index 1f10a2ed6..84280372b 100644 --- a/packages/instant/src/components/animations/slide_animations.tsx +++ b/packages/instant/src/components/animations/slide_animations.tsx @@ -1,6 +1,7 @@ import * as React from 'react'; +import { Keyframes } from 'styled-components'; -import { keyframes, styled } from '../../style/theme'; +import { css, keyframes, styled } from '../../style/theme'; const slideKeyframeGenerator = (fromY: string, toY: string) => keyframes` from { @@ -15,7 +16,7 @@ const slideKeyframeGenerator = (fromY: string, toY: string) => keyframes` `; export interface SlideAnimationProps { - keyframes: string; + keyframes: Keyframes; animationType: string; animationDirection?: string; } @@ -24,7 +25,10 @@ export const SlideAnimation = styled.div < SlideAnimationProps > ` - animation-name: ${props => props.keyframes}; + animation-name: ${props => + css` + ${props.keyframes}; + `}; animation-duration: 0.3s; animation-timing-function: ${props => props.animationType}; animation-delay: 0s; |