Improve video navigation by repositioning scroll buttons
Refactors the horizontal scrolling mechanism in the `netflix-grid.tsx` component, replacing broad scroll areas with targeted left and right arrow buttons. These buttons appear on hover and are positioned to prevent interference with video selection. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 074b0e4c-6171-43bd-aa98-f9e04623ca14 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/074b0e4c-6171-43bd-aa98-f9e04623ca14/7j5FE92
This commit is contained in:
parent
6af0b01f23
commit
b5f0bcb2ae
@ -191,27 +191,27 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
{/* Left scroll area - covers left half */}
|
{/* Left scroll button - only on edge */}
|
||||||
<div
|
<Button
|
||||||
className="absolute left-0 top-0 w-1/2 h-full z-20 flex items-center justify-start pl-4"
|
onClick={() => scroll('left')}
|
||||||
onMouseEnter={() => startAutoScroll('left')}
|
onMouseEnter={() => startAutoScroll('left')}
|
||||||
onMouseLeave={stopAutoScroll}
|
onMouseLeave={stopAutoScroll}
|
||||||
|
className="absolute left-2 top-1/2 -translate-y-1/2 z-30 bg-black/80 hover:bg-black/95 text-white border-none w-12 h-12 rounded-full opacity-0 group-hover:opacity-100 transition-all duration-300 flex items-center justify-center shadow-xl"
|
||||||
|
size="sm"
|
||||||
>
|
>
|
||||||
<div className="bg-black/60 hover:bg-black/80 text-white w-12 h-12 rounded-full opacity-0 group-hover:opacity-100 transition-all duration-300 flex items-center justify-center shadow-xl cursor-pointer">
|
<ChevronLeft className="w-5 h-5" />
|
||||||
<ChevronLeft className="w-6 h-6" />
|
</Button>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Right scroll area - covers right half */}
|
{/* Right scroll button - only on edge */}
|
||||||
<div
|
<Button
|
||||||
className="absolute right-0 top-0 w-1/2 h-full z-20 flex items-center justify-end pr-4"
|
onClick={() => scroll('right')}
|
||||||
onMouseEnter={() => startAutoScroll('right')}
|
onMouseEnter={() => startAutoScroll('right')}
|
||||||
onMouseLeave={stopAutoScroll}
|
onMouseLeave={stopAutoScroll}
|
||||||
|
className="absolute right-2 top-1/2 -translate-y-1/2 z-30 bg-black/80 hover:bg-black/95 text-white border-none w-12 h-12 rounded-full opacity-0 group-hover:opacity-100 transition-all duration-300 flex items-center justify-center shadow-xl"
|
||||||
|
size="sm"
|
||||||
>
|
>
|
||||||
<div className="bg-black/60 hover:bg-black/80 text-white w-12 h-12 rounded-full opacity-0 group-hover:opacity-100 transition-all duration-300 flex items-center justify-center shadow-xl cursor-pointer">
|
<ChevronRight className="w-5 h-5" />
|
||||||
<ChevronRight className="w-6 h-6" />
|
</Button>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Scrollable video row - true edge to edge */}
|
{/* Scrollable video row - true edge to edge */}
|
||||||
<div
|
<div
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user