From 732d31ca5103c3eda4204aa44304dfc70593c46a Mon Sep 17 00:00:00 2001 From: Dirk-Jan Wassink Date: Wed, 10 Oct 2018 11:11:39 +0200 Subject: [PATCH] Added Keyframes to InterpolationValue to support the new keyframes --- types/styled-components/index.d.ts | 1 + types/styled-components/styled-components-tests.tsx | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/types/styled-components/index.d.ts b/types/styled-components/index.d.ts index e449633123..c6210edf91 100644 --- a/types/styled-components/index.d.ts +++ b/types/styled-components/index.d.ts @@ -37,6 +37,7 @@ export type InterpolationValue = | number | Styles | FalseyValue + | Keyframes | StyledComponentClass; export type SimpleInterpolation = | InterpolationValue diff --git a/types/styled-components/styled-components-tests.tsx b/types/styled-components/styled-components-tests.tsx index d49fae3ebd..8adfb03307 100644 --- a/types/styled-components/styled-components-tests.tsx +++ b/types/styled-components/styled-components-tests.tsx @@ -97,6 +97,14 @@ const fadeIn = keyframes` } `; +const animationRule = css` + ${fadeIn} 1s infinite alternate; +`; + +const ComponentWithKeyframe = styled.div` + animation: ${animationRule}; +`; + const theme = { main: 'mediumseagreen', };