Skip to content

Commit 2c7e5ea

Browse files
Enhancement: extend hover activation hotspot for navigation arrows
Co-authored-by: Rahul Harpal <51887323+rahulharpal1603@users.noreply.github.com>
1 parent c8e04f0 commit 2c7e5ea

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

frontend/src/components/Media/NavigationButtons.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,22 @@ export const NavigationButtons: React.FC<NavigationButtonsProps> = ({
1414
<>
1515
<button
1616
onClick={onPrevious}
17-
className="absolute top-1/2 left-4 z-30 flex -translate-y-1/2 transform cursor-pointer items-center rounded-full bg-black/30 p-3 text-white backdrop-blur-md transition-all duration-200 hover:bg-black/50 hover:shadow-lg"
17+
className="group absolute inset-y-0 left-0 z-30 flex w-20 cursor-pointer items-center justify-center bg-transparent text-white"
1818
aria-label="Previous image"
1919
>
20-
<ChevronLeft className="h-6 w-6" />
20+
<span className="flex items-center justify-center rounded-full p-3 backdrop-blur-md transition-all duration-200 group-hover:bg-black/80 group-hover:shadow-lg">
21+
<ChevronLeft className="h-6 w-6" />
22+
</span>
2123
</button>
2224

2325
<button
2426
onClick={onNext}
25-
className="absolute top-1/2 right-4 z-30 flex -translate-y-1/2 transform cursor-pointer items-center rounded-full bg-black/30 p-3 text-white backdrop-blur-md transition-all duration-200 hover:bg-black/50 hover:shadow-lg"
27+
className="group absolute inset-y-0 right-0 z-30 flex w-20 cursor-pointer items-center justify-center bg-transparent text-white"
2628
aria-label="Next image"
2729
>
28-
<ChevronRight className="h-6 w-6" />
30+
<span className="flex items-center justify-center rounded-full p-3 backdrop-blur-md transition-all duration-200 group-hover:bg-black/80 group-hover:shadow-lg">
31+
<ChevronRight className="h-6 w-6" />
32+
</span>
2933
</button>
3034
</>
3135
);

0 commit comments

Comments
 (0)