22 lines
1.2 KiB
JavaScript
22 lines
1.2 KiB
JavaScript
import CategoryItemCard from "@/Components/CategoryItemCard"
|
|
|
|
export default function CategoryCard({ category }){
|
|
return (
|
|
<div className="flex bg-white rounded-lg col-span-2 lg:col-span-1 h-full p-6 justify-between">
|
|
<div className="flex flex-col">
|
|
<span className="text-xl font-semibold">{category.title}</span>
|
|
<span className="text-gray-600">{category.products.length } محصول</span>
|
|
<span className="text-gray-600">{category.description}</span>
|
|
</div>
|
|
<div className="flex">
|
|
{category.products[0] ? <CategoryItemCard item={ category.products[0] } /> : null}
|
|
<button className="flex flex-col items-center h-full bg-gray-200 p-6 rounded-lg z-40">
|
|
<span className="text-lg">افزودن محصول</span>
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" className="w-6 h-6">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M12 6v12m6-6H6" />
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
)
|
|
} |