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', };