From af4b0cea03e5843706e4e17d48b2de7cfc5027de Mon Sep 17 00:00:00 2001 From: Daniele Pancottini Date: Sat, 11 Feb 2023 11:14:31 +0100 Subject: [PATCH] Wrap product card with chackra card --- .../product/ProductCard/ProductCard.tsx | 238 +++++++++--------- site/pages/contact.tsx | 10 +- 2 files changed, 127 insertions(+), 121 deletions(-) diff --git a/site/components/product/ProductCard/ProductCard.tsx b/site/components/product/ProductCard/ProductCard.tsx index 56388e705..9d264ab5c 100644 --- a/site/components/product/ProductCard/ProductCard.tsx +++ b/site/components/product/ProductCard/ProductCard.tsx @@ -6,7 +6,7 @@ import s from './ProductCard.module.css' import Image, { ImageProps } from 'next/image' import WishlistButton from '@components/wishlist/WishlistButton' import usePrice from '@framework/product/use-price' -import { Stack, Text, Heading, Box, useColorModeValue } from '@chakra-ui/react' +import { Stack, Text, Heading, Box, useColorModeValue, Card, CardBody } from '@chakra-ui/react' interface Props { className?: string @@ -42,132 +42,136 @@ const ProductCard: FC = ({ const fontColor = useColorModeValue("black", "black"); return ( - - setIsHover(false)} onMouseOver={() => setIsHover(true)}> - {variant === 'slim' && !isHover && ( - <> -
- {product.name} -
- {product?.images && ( -
- {product.name -
- )} - - )} - - {variant === 'simple' && !isHover && ( - <> - {process.env.COMMERCE_WISHLIST_ENABLED && ( - - )} -
- {product?.images && ( -
- {product.name + + + + setIsHover(false)} onMouseOver={() => setIsHover(true)}> + {variant === 'slim' && !isHover && ( + <> +
+ {product.name}
- )} -
- - )} - - {variant === 'default' && !isHover && ( - <> - {process.env.COMMERCE_WISHLIST_ENABLED && ( - - )} -
- {product?.images && ( -
- {product.name -
- )} -
- - )} - - {isHover && ( - <> - - {process.env.COMMERCE_WISHLIST_ENABLED && ( - - )} -
{product?.images && (
{product.name
)} -
- - - {product.name} - - - - {`${price} ${product.price?.currencyCode}`} - + + )} + + {variant === 'simple' && !isHover && ( + <> + {process.env.COMMERCE_WISHLIST_ENABLED && ( + + )} +
+ {product?.images && ( +
+ {product.name +
+ )} +
+ + )} + + {variant === 'default' && !isHover && ( + <> + {process.env.COMMERCE_WISHLIST_ENABLED && ( + + )} +
+ {product?.images && ( +
+ {product.name +
+ )} +
+ + )} + + {isHover && ( + <> + + {process.env.COMMERCE_WISHLIST_ENABLED && ( + + )} +
+ {product?.images && ( +
+ {product.name +
+ )} +
+ + + {product.name} + + + + {`${price} ${product.price?.currencyCode}`} + + -
-
- - )} - -
- + + + )} + + + + + ) } diff --git a/site/pages/contact.tsx b/site/pages/contact.tsx index c956f4600..0f40d8676 100644 --- a/site/pages/contact.tsx +++ b/site/pages/contact.tsx @@ -6,10 +6,12 @@ import { Text as TextUI } from '@components/ui' export default function Contact() { return (
- Contatti - - Puoi contattarci usando i recapiti che trovi qui sotto... - + + Contatti + + Puoi contattarci usando i recapiti che trovi qui sotto! + +