I am using CRA 4, when using keyframes with styled components, percentages cause an error that I cannot seem to understand why - but doesn't error if I use To / From.
this is the example:
import styled, { keyframes } from 'styled-components'
const animateLeft = keyframes`
0% {
opacity: 1
}
50% {
opacity: 0.4;
}
100% {
opacity: 1;
}
`
Used inside a styled component as such:
animation: ${animateLeft} 1s infinite;
The error I get with the percentages inside the keyframes are:
} expectedts-styled-plugin(9999)
Why?