mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 03:55:38 -04:00
Wraps the hero banner h2 in a Link with a subtle primary color hover transition, matching the app's warm-accent interaction pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
55 lines
1.4 KiB
TypeScript
55 lines
1.4 KiB
TypeScript
"use client";
|
|
|
|
import { WheelGesturesPlugin } from "embla-carousel-wheel-gestures";
|
|
import { motion } from "motion/react";
|
|
import {
|
|
Carousel,
|
|
CarouselContent,
|
|
CarouselItem,
|
|
} from "@/components/ui/carousel";
|
|
import {
|
|
ContinueWatchingCard,
|
|
type ContinueWatchingItemProps,
|
|
} from "./continue-watching-card";
|
|
|
|
const staggerContainer = {
|
|
hidden: {},
|
|
visible: { transition: { staggerChildren: 0.05 } },
|
|
};
|
|
|
|
const staggerItem = {
|
|
hidden: { opacity: 0, y: 12, scale: 0.98 },
|
|
visible: {
|
|
opacity: 1,
|
|
y: 0,
|
|
scale: 1,
|
|
transition: { type: "spring" as const, stiffness: 300, damping: 24 },
|
|
},
|
|
};
|
|
|
|
export function ContinueWatchingList({
|
|
items,
|
|
}: {
|
|
items: ContinueWatchingItemProps[];
|
|
}) {
|
|
return (
|
|
<motion.div variants={staggerContainer} initial="hidden" animate="visible">
|
|
<Carousel
|
|
opts={{ align: "start", dragFree: true, containScroll: "trimSnaps" }}
|
|
plugins={[WheelGesturesPlugin({ forceWheelAxis: "x" })]}
|
|
className="-mx-4 sm:-mx-0"
|
|
>
|
|
<CarouselContent className="px-4 sm:px-0">
|
|
{items.map((item) => (
|
|
<CarouselItem key={item.title.id} className="basis-auto pl-4">
|
|
<motion.div variants={staggerItem}>
|
|
<ContinueWatchingCard item={item} />
|
|
</motion.div>
|
|
</CarouselItem>
|
|
))}
|
|
</CarouselContent>
|
|
</Carousel>
|
|
</motion.div>
|
|
);
|
|
}
|