Improve carousel display and fix overlapping edges
Adjusted padding and margin in SimpleCarousel component (`simple-carousel.tsx`) to correct overlapping edges and ensure proper display of carousel items. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 2eb1084e-b728-4449-9231-f1665924c8d5 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2eb1084e-b728-4449-9231-f1665924c8d5/kdQ95gE
This commit is contained in:
parent
c5ac95846d
commit
df5be7285c
@ -101,7 +101,7 @@ export default function SimpleCarousel({ category, onVideoClick }: SimpleCarouse
|
|||||||
{category.title}
|
{category.title}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div className="relative" style={{ overflow: 'visible' }}>
|
<div className="relative -mx-8 px-8" style={{ overflow: 'visible' }}>
|
||||||
{/* Left scroll button */}
|
{/* Left scroll button */}
|
||||||
<button
|
<button
|
||||||
onClick={() => scroll('left')}
|
onClick={() => scroll('left')}
|
||||||
@ -125,14 +125,14 @@ export default function SimpleCarousel({ category, onVideoClick }: SimpleCarouse
|
|||||||
{/* Scroll container */}
|
{/* Scroll container */}
|
||||||
<div
|
<div
|
||||||
ref={scrollContainerRef}
|
ref={scrollContainerRef}
|
||||||
className="overflow-x-auto"
|
className="overflow-x-auto -mx-4 px-4"
|
||||||
style={{
|
style={{
|
||||||
overflowY: 'visible',
|
overflowY: 'visible',
|
||||||
scrollbarWidth: 'none',
|
scrollbarWidth: 'none',
|
||||||
msOverflowStyle: 'none'
|
msOverflowStyle: 'none'
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="flex space-x-4 pb-4 w-max" style={{ overflow: 'visible' }}>
|
<div className="flex space-x-4 pb-4 w-max -my-4 py-4" style={{ overflow: 'visible' }}>
|
||||||
{/* Create many copies for infinite feel */}
|
{/* Create many copies for infinite feel */}
|
||||||
{Array.from({ length: 20 }).map((_, copyIndex) =>
|
{Array.from({ length: 20 }).map((_, copyIndex) =>
|
||||||
category.videos.map((video, videoIndex) => (
|
category.videos.map((video, videoIndex) => (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user