Using animation in styled components

Viewed 491

I am having one style which rotate the icon and apply some animation , the css works fine but when I convert the css into styled components it partially works , I debugged and found out something is wrong with animation property.

https://codesandbox.io/s/fragrant-firefly-dmck8d

1 Answers

Try this


export const StyledLoaderInner = styled.span`
    animation: ${StyledLoaderInnerFrame} 2s ease-in infinite,
    ${StyledLoaderMainKeyFrame} 2s ease infinite;
  background: hsla(0, 0%, 100%, 0.8);
  left: 0;
  position: absolute;
  right: 0;
`;
Related