Trying some stuff with styled-components & keyframes. It's about animating text color. It does work when using hex codes or css color names. However, I'd like to use the colors I've got defined in my theme. It doesn't seem to work though? How can I use props here?
const changeColor = keyframes`
0% {
color: ${props => props.theme.color.somecolor};
}
100% {
color: ${props => props.theme.color.somecolor};
}
`;
const ColorChange = css`
-webkit-animation: ${changeColor} 3s infinite;
-moz-animation: ${changeColor} 3s infinite;
-o-animation: ${changeColor} 3s infinite;
-ms-animation: ${changeColor} 3s infinite;
animation: ${changeColor} 3s infinite;
`;
const ColorChangeComponent = styled.span`
${ColorChange}
`;