Files
mehraein-front/app/product/components/ProductRelated.tsx
T
hamid zarghami 112aee1cdf responsive
2026-07-21 15:16:47 +03:30

28 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { Carousel, CarouselControls, CarouselSlide, CarouselTrack } from "@/app/components/Carousel";
import ProductCard from "@/app/home/components/ProductCard";
import { type FC } from "react";
import { RELATED_PRODUCTS } from "../constants";
const ProductRelated: FC = () => {
return (
<section className="mt-8 px-4 sm:mt-10 sm:px-8 lg:mt-12 lg:px-30">
<Carousel slidesPerView={{ base: 1.4, md: 3, lg: 5 }} gap={{ base: 12, md: 16, lg: 24 }}>
<div className="flex items-center justify-between gap-4">
<h2 className="text-lg font-bold text-[#0A1B2C] sm:text-xl">محصولات مرتبط</h2>
<CarouselControls prevLabel="محصولات قبلی" nextLabel="محصولات بعدی" />
</div>
<CarouselTrack className="mt-6 px-2 py-4 -mx-2 sm:mt-8">
{RELATED_PRODUCTS.map((title) => (
<CarouselSlide key={title}>
<ProductCard title={title} />
</CarouselSlide>
))}
</CarouselTrack>
</Carousel>
</section>
);
};
export default ProductRelated;