Merge pull request #29601 from DJWassink/change/keyframes

[styled-components] Added Keyframes to InterpolationValue
This commit is contained in:
Igor Oleinikov
2018-10-10 10:36:13 -07:00
committed by GitHub
2 changed files with 9 additions and 0 deletions
+1
View File
@@ -37,6 +37,7 @@ export type InterpolationValue =
| number
| Styles
| FalseyValue
| Keyframes
| StyledComponentClass<any, any>;
export type SimpleInterpolation =
| InterpolationValue
@@ -97,6 +97,14 @@ const fadeIn = keyframes`
}
`;
const animationRule = css`
${fadeIn} 1s infinite alternate;
`;
const ComponentWithKeyframe = styled.div`
animation: ${animationRule};
`;
const theme = {
main: 'mediumseagreen',
};