This commit is contained in:
Davron Chetin
2025-10-14 17:16:41 +05:00
parent a3b2d187ae
commit d126d7f8e3
14 changed files with 218 additions and 42 deletions

View File

@@ -0,0 +1,25 @@
"use client";
import { ProductTypes } from "@/types";
import Image from "next/image";
import Link from "next/link";
export default function ProductCard({data}:{data: ProductTypes}) {
return (
<Link href={`/${data.path}`} className="h-[400px] flex flex-col items-center justify-between rounded-sm hover:scale-105 hover:cursor-pointer hover:shadow-[0px_0px_5px_10px_#ebebeb]">
<div className="rounded-t-lg bg-white py-15 px-2" >
<Image
src={data.image}
alt={data.truck_name}
width={200}
height={200}
className="object-contain max-h-[200px] h-full"
/>
</div>
<div className="bg-[#fafafa] w-full py-5 rounded-b-lg flex flex-col items-center justify-center ">
<p>{data.truck_name}</p>
<p className="text-secondary">{data.desc}</p>
</div>
</Link>
);
}

View File

@@ -0,0 +1,22 @@
import Image, { StaticImageData } from "next/image";
import Link from "next/link";
interface typePropData{
id:number;
image:StaticImageData | string;
text:string;
title:string;
path:string;
}
export default function SliderCard({data}:{data:typePropData}) {
return (
<Link href={data.path} id="news_slider_card" className="group" >
<Image src={data.image} alt="slider image" width={1} height={1} />
<div className="relative border flex flex-col items-start justify-start">
<div>{data.title}</div>
<div>{data.text}</div>
</div>
</Link>
)
}