37 lines
886 B
TypeScript
37 lines
886 B
TypeScript
import Carousel from "@/front/Components/Shared/Carousel";
|
|
import StatCard from "@/front/Components/Stats/StatCard";
|
|
|
|
interface Stat {
|
|
number: string;
|
|
subtitle: string;
|
|
description: string;
|
|
rotation?: number;
|
|
}
|
|
|
|
interface StatsCarouselProps {
|
|
stats: Stat[];
|
|
}
|
|
|
|
export default function StatsCarousel({ stats }: Readonly<StatsCarouselProps>) {
|
|
return (
|
|
<Carousel
|
|
type="window"
|
|
windowSize={3}
|
|
slotClassName="w-[370px]"
|
|
items={stats}
|
|
renderItem={(stat, index, isActive) => (
|
|
<StatCard
|
|
number={stat.number}
|
|
subtitle={stat.subtitle}
|
|
description={stat.description}
|
|
rotation={stat.rotation}
|
|
isActive={isActive}
|
|
/>
|
|
)}
|
|
gap="gap-6 lg:gap-12"
|
|
controlsColor="text-bleu border-bleu hover:bg-bleu/10"
|
|
controlsDotColor="bg-bleu"
|
|
showStar={false}
|
|
/>
|
|
);
|
|
}
|