import React from 'react'; import { Button } from '../atoms/Button'; interface ProductCardProps { title: string; price: string; compareAtPrice?: string; imageUrl: string; imageAlt?: string; productUrl?: string; onAddToCart?: () => void; onQuickView?: () => void; showQuickView?: boolean; addToCartText?: string; badge?: string; className?: string; } /** * ProductCard Molecule - Displays product information with actions * Example molecule component for Shopify products - feel free to modify or delete */ export const ProductCard: React.FC = ({ title, price, compareAtPrice, imageUrl, imageAlt, productUrl, onAddToCart, onQuickView, showQuickView = true, addToCartText = 'Add to Cart', badge, className = '' }) => { const hasDiscount = compareAtPrice && compareAtPrice !== price; return (
{/* Badge */} {badge && (
{badge}
)} {/* Image */}
{imageAlt
{/* Content */}
{/* Title */}

{productUrl ? ( {title} ) : ( title )}

{/* Price */}
{price} {hasDiscount && ( {compareAtPrice} )}
{/* Actions */}
{showQuickView && onQuickView && ( )}
); };