I'm trying to create infinity rotating for an image (img tag) using built in styled component implementation from MUI (before it was implemented on external library).
Here is my fragment of code. If I'm running it I have an error.
export const SearchPreloaderContainerDiv = styled('div')({
margin: '0 auto',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
flex: 1,
'& h4': {
margin: '50px 0 0 0',
color: '#282828',
fontFamily: 'Cuprum',
fontStyle: 'normal',
fontSize: '43px',
lineHeight: '70px',
},
'@keyframes loader': {
from: {
transform: 'rotate(0deg)',
},
to: {
transform: 'rotate(360deg)',
},
},
'& img': {
padding: '20px',
boxSizing: 'border-box',
animation: 'loader linear 3s infinite',
},
});
Before it was implemented using keyframes helper from external styled-componet library but now I can not find similar helper in MUI