import React from 'react'; import styles from './ProductCard.module.css'; const ProductCard = ({ product, onCardClick, isCenter, canHover, onCollapse }) => { return (
{product.name} { e.currentTarget.src = '/assets/images/placeholder-product.png'; }} />
{ // Collapse overlay when clicking on the overlay background (not buttons) if (isCenter && canHover && onCollapse) { // Check if the click target is the overlay itself, not a button if (e.target === e.currentTarget) { e.stopPropagation(); onCollapse(); } } }} >

{product.name}

{product.description}

); }; export default ProductCard;