Skip to content

Commit 8a64475

Browse files
typeofwebEndo
and
Endo
authored
saleor#617 Fix ImageExpand (saleor#645)
Co-authored-by: Endo <[email protected]>
1 parent 27d23b8 commit 8a64475

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

apps/storefront/components/product/ImageExpand.tsx

+5-11
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,13 @@ export function ImageExpand({ image, onRemoveExpand }: ImageExpandProps) {
1515

1616
return (
1717
<div className="min-h-screen absolute overflow-hidden grid grid-cols-1 mx-auto px-8 md:h-full w-full bg-gray-100">
18-
<div
19-
role="button"
20-
tabIndex={0}
21-
className="absolute grid h-6 justify-end w-full z-40 p-8 lg:px-8 mx-auto"
22-
onClick={() => onRemoveExpand()}
23-
onKeyDown={(e) => {
24-
if (e.key === "Enter") {
25-
onRemoveExpand();
26-
}
27-
}}
18+
<button
19+
className="absolute grid content-center justify-center right-0 p-8 h-6 w-6 z-40 mt-18"
20+
aria-label="Close"
21+
onClick={onRemoveExpand}
2822
>
2923
<XIcon className="w-6 h-6" />
30-
</div>
24+
</button>
3125
<div className="w-full h-full absolute md:mt-10">
3226
<Image src={image.url} alt={image.alt} layout="fill" objectFit="scale-down" />
3327
</div>

0 commit comments

Comments
 (0)