Skip to content

Commit

Permalink
fix(playlist): smooth transition on hover
Browse files Browse the repository at this point in the history
- Fix transition to work smoothly on hover
  • Loading branch information
“Anton committed Jun 21, 2022
1 parent e2e103f commit 0ab070f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/DynamicBlur/DynamicBlur.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
background-position: center center;
background-size: cover;
opacity: 0;
filter: blur(30px);
filter: blur(30px) brightness(60%);
}
4 changes: 2 additions & 2 deletions src/components/DynamicBlur/DynamicBlur.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ const DynamicBlur = ({ url, transitionTime = 1, debounceTime = 350 }: Props): JS
}
if (currentImg !== 1) {
firstImage.current.style.backgroundImage = `url('${url}')`;
firstImage.current.style.opacity = '0.3';
firstImage.current.style.opacity = '1';
secondImage.current.style.opacity = '0';
return setCurrentImg(1);
} else {
secondImage.current.style.backgroundImage = `url('${url}')`;
firstImage.current.style.opacity = '0';
secondImage.current.style.opacity = '0.3';
secondImage.current.style.opacity = '1';
return setCurrentImg(2);
}
};
Expand Down

0 comments on commit 0ab070f

Please sign in to comment.