Disable scrolling to the top when switching between gallery images with arrow buttons (#1139)

This commit is contained in:
Emir Morgan 2023-08-04 00:04:44 +03:00 committed by GitHub
parent 9e1388f974
commit 80bb15a7dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,11 +47,17 @@ export function Gallery({ images }: { images: { src: string; altText: string }[]
aria-label="Previous product image" aria-label="Previous product image"
href={previousUrl} href={previousUrl}
className={buttonClassName} className={buttonClassName}
scroll={false}
> >
<ArrowLeftIcon className="h-5" /> <ArrowLeftIcon className="h-5" />
</Link> </Link>
<div className="mx-1 h-6 w-px bg-neutral-500"></div> <div className="mx-1 h-6 w-px bg-neutral-500"></div>
<Link aria-label="Next product image" href={nextUrl} className={buttonClassName}> <Link
aria-label="Next product image"
href={nextUrl}
className={buttonClassName}
scroll={false}
>
<ArrowRightIcon className="h-5" /> <ArrowRightIcon className="h-5" />
</Link> </Link>
</div> </div>