Skip to content

Commit

Permalink
[Skeleton] Fix wave animation for styled-components (#43740)
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp authored Sep 13, 2024
1 parent e727062 commit e513ea3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/mui-material/src/Skeleton/Skeleton.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ const pulseAnimation =
const waveAnimation =
typeof waveKeyframe !== 'string'
? css`
animation: ${waveKeyframe} 2s linear 0.5s infinite;
&::after {
animation: ${waveKeyframe} 2s linear 0.5s infinite;
}
`
: null;

Expand Down Expand Up @@ -192,8 +194,8 @@ const SkeletonRoot = styled('span', {
props: {
animation: 'wave',
},
style: {
'&::after': waveAnimation || {
style: waveAnimation || {
'&::after': {
animation: `${waveKeyframe} 2s linear 0.5s infinite`,
},
},
Expand Down

0 comments on commit e513ea3

Please sign in to comment.