Spaces:
Running
Running
Upload components/ProductDetailModal.jsx with huggingface_hub
Browse files
components/ProductDetailModal.jsx
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React, { useState } from 'react';
|
| 2 |
+
import { X, Plus, Minus, ShoppingBag } from 'lucide-react';
|
| 3 |
+
|
| 4 |
+
const ProductDetailModal = ({
|
| 5 |
+
product,
|
| 6 |
+
isOpen,
|
| 7 |
+
onClose,
|
| 8 |
+
onAddToCart
|
| 9 |
+
}) => {
|
| 10 |
+
const [quantity, setQuantity] = useState(1);
|
| 11 |
+
|
| 12 |
+
if (!isOpen || !product) return null;
|
| 13 |
+
|
| 14 |
+
const formatPrice = (price)
|