diff --git a/src/components/cart/CartItem.tsx b/src/components/cart/CartItem.tsx new file mode 100644 index 0000000..2c793c1 --- /dev/null +++ b/src/components/cart/CartItem.tsx @@ -0,0 +1,53 @@ +'use client'; + +import React from 'react'; +import Image from 'next/image'; +import { Minus, Plus, Trash2 } from 'lucide-react'; + +interface CartItemProps { + item: { id: string; name: string; price: number; quantity: number; imageSrc: string; imageAlt?: string }; + onUpdateQuantity: (productId: string, newQuantity: number) => void; + onRemove: (productId: string) => void; +} + +export const CartItem = ({ item, onUpdateQuantity, onRemove }: CartItemProps) => { + return ( +
+
+
+ {item.imageAlt +
+
+

{item.name}

+

${item.price.toFixed(2)}

+
+
+
+
+ + {item.quantity} + +
+ +
+
+ ); +};