mirror of
https://gitlab.com/davidels1986/ore-cart-checkout.git
synced 2026-10-31 03:29:14 +00:00
Preceding changes
This commit is contained in:
parent
8922bd5aa4
commit
dbb756dcee
1 changed files with 3 additions and 7 deletions
|
|
@ -51,14 +51,10 @@ export function ProductCard({ product }: ProductCardProps) {
|
|||
/>
|
||||
<Button
|
||||
size="icon"
|
||||
className="absolute top-1.5 right-1.5 h-8 w-8 md:h-8 md:w-8 opacity-100 md:opacity-0 md:group-hover:opacity-100 transition-all md:transform md:translate-y-2 md:group-hover:translate-y-0 touch-manipulation"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
addItem(product);
|
||||
}}
|
||||
className={`absolute top-1.5 right-1.5 h-8 w-8 md:h-8 md:w-8 opacity-100 md:opacity-0 md:group-hover:opacity-100 transition-all md:transform md:translate-y-2 md:group-hover:translate-y-0 touch-manipulation ${justAdded ? 'bg-green-600 hover:bg-green-600' : ''}`}
|
||||
onClick={handleAdd}
|
||||
>
|
||||
<Plus className="h-4 w-4" />
|
||||
{justAdded ? <Check className="h-4 w-4" /> : <Plus className="h-4 w-4" />}
|
||||
</Button>
|
||||
</div>
|
||||
<CardContent className="p-2 md:p-3">
|
||||
|
|
|
|||
Loading…
Reference in a new issue