fix(SW-842): fixed close button positioning
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
"use client"
|
||||
import { AnimatePresence, motion } from "framer-motion"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { ChevronRightIcon } from "@/components/Icons"
|
||||
import { ChevronLeftIcon } from "@/components/Icons"
|
||||
import ArrowRightIcon from "@/components/Icons/ArrowRight"
|
||||
import CloseIcon from "@/components/Icons/Close"
|
||||
import Image from "@/components/Image"
|
||||
@@ -19,6 +20,7 @@ export default function Gallery({
|
||||
onImageClick,
|
||||
selectedImage,
|
||||
}: GalleryProps) {
|
||||
const intl = useIntl()
|
||||
const mainImage = selectedImage || images[0]
|
||||
const mainImageIndex = images.findIndex((img) => img === mainImage)
|
||||
|
||||
@@ -46,16 +48,17 @@ export default function Gallery({
|
||||
<Button
|
||||
intent="text"
|
||||
size="small"
|
||||
theme="base"
|
||||
variant="icon"
|
||||
className={styles.desktopGalleryCloseButton}
|
||||
className={styles.closeButton}
|
||||
onClick={onClose}
|
||||
aria-label={intl.formatMessage({ id: "Close" })}
|
||||
>
|
||||
<CloseIcon
|
||||
<ChevronLeftIcon
|
||||
color="black"
|
||||
width={32}
|
||||
height={32}
|
||||
className={styles.desktopGalleryCloseIcon}
|
||||
className={styles.mobileCloseIcon}
|
||||
/>
|
||||
<CloseIcon width={32} height={32} className={styles.desktopCloseIcon} />
|
||||
</Button>
|
||||
{/* Desktop Gallery */}
|
||||
<div className={styles.desktopGallery}>
|
||||
@@ -129,19 +132,6 @@ export default function Gallery({
|
||||
|
||||
{/* Mobile Gallery */}
|
||||
<div className={styles.mobileGallery}>
|
||||
<Button
|
||||
intent="text"
|
||||
size="small"
|
||||
className={styles.mobileGalleryCloseButton}
|
||||
onClick={onClose}
|
||||
>
|
||||
<ChevronRightIcon
|
||||
color="black"
|
||||
width={32}
|
||||
height={32}
|
||||
className={styles.leftTransformIcon}
|
||||
/>
|
||||
</Button>
|
||||
<div className={styles.mobileGalleryContent}>
|
||||
<div className={styles.thumbnailGrid}>
|
||||
{images.map((image, index) => (
|
||||
|
||||
Reference in New Issue
Block a user