fix(SW-842): fixed close button positioning

This commit is contained in:
Erik Tiekstra
2024-11-14 07:51:06 +01:00
parent 692320bd61
commit cc7f4e0478
10 changed files with 37 additions and 31 deletions

View File

@@ -1,6 +1,7 @@
"use client"
import { useState } from "react"
import { useIntl } from "react-intl"
import { GalleryIcon } from "@/components/Icons"
import Image from "@/components/Image"
@@ -17,6 +18,7 @@ export default function ImageGallery({
fill,
height = 280,
}: ImageGalleryProps) {
const intl = useIntl()
const [lightboxIsOpen, setLightboxIsOpen] = useState(false)
const imageProps = fill ? { fill } : { height, width: height * 1.5 }
@@ -30,6 +32,7 @@ export default function ImageGallery({
className={styles.triggerArea}
role="button"
onClick={() => setLightboxIsOpen(true)}
aria-label={intl.formatMessage({ id: "Open image gallery" })}
>
<Image
className={styles.image}