refactor: resume animate where paused

This commit is contained in:
Tristan 2019-10-16 22:09:25 +08:00
parent 8f822a7d03
commit 5711592d0a
2 changed files with 3 additions and 2 deletions

View File

@ -25,8 +25,9 @@ const StyledWraper = styled.aside`
audio {
display: none;
}
animation: ${Rotation} 2s infinite linear forwards;
&.playing {
animation: ${Rotation} 2s infinite linear forwards;
animation-play-state: running;
}
&.paused {
animation-play-state: paused;

View File

@ -18,7 +18,7 @@ const Wrapper = styled.li`
transition: all 0.5s;
align-self: flex-start;
opacity: 0.8;
background-color: ${({ rgb }) => `rgba(${rgb.join(',')},.4)`};
background-color: ${({ rgb }) => `rgba(${rgb.join(',')},.3)`};
&:hover {
opacity: 0.9;
box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);