add container to expanded images

This commit is contained in:
Tom
2023-04-30 13:32:52 +02:00
parent 272752a522
commit 7008b5649d
4 changed files with 126 additions and 82 deletions
+8 -1
View File
@@ -1,5 +1,12 @@
const handleImageClick = (e) => {
e.target.classList.toggle('enlarged');
const image = e.target;
const container = image.closest('.img-container');
image.classList.toggle('enlarged');
if (container) {
container.classList.toggle('expanded-container');
}
};
export default handleImageClick;