27 lines
1.0 KiB
TypeScript
27 lines
1.0 KiB
TypeScript
import { Carousel, CarouselControls, CarouselSlide, CarouselTrack } from "@/app/components/Carousel";
|
||
import { type FC } from "react";
|
||
import ProductCard from "./ProductCard";
|
||
|
||
const ProductSection: FC = () => {
|
||
return (
|
||
<div className="mt-12 px-4 sm:mt-16 sm:px-8 lg:mt-[120px] lg:px-[120px]">
|
||
<Carousel slidesPerView={{ base: 1.4, md: 3, lg: 5 }} gap={{ base: 16, md: 24, lg: 40 }}>
|
||
<div className="flex justify-between items-center gap-4">
|
||
<div className="font-bold text-lg sm:text-2xl">محبوبترین محصولات</div>
|
||
<CarouselControls prevLabel="محصولات قبلی" nextLabel="محصولات بعدی" />
|
||
</div>
|
||
|
||
<CarouselTrack className="mt-8 sm:mt-12 px-2 sm:px-3 py-4 -mx-2 sm:-mx-3">
|
||
{Array.from({ length: 10 }).map((_, index) => (
|
||
<CarouselSlide key={index}>
|
||
<ProductCard />
|
||
</CarouselSlide>
|
||
))}
|
||
</CarouselTrack>
|
||
</Carousel>
|
||
</div>
|
||
);
|
||
};
|
||
|
||
export default ProductSection;
|