diff --git a/components/product/ProductCard/ProductCard.module.css b/components/product/ProductCard/ProductCard.module.css index 559bc1b69..a8b1b67bd 100644 --- a/components/product/ProductCard/ProductCard.module.css +++ b/components/product/ProductCard/ProductCard.module.css @@ -41,8 +41,8 @@ } } -.wishlistButton { - @apply top-3 right-3 z-50 absolute bg-accent-9 text-accent-0; +.root .wishlistButton { + @apply top-0 right-0 z-30 absolute; } .productTitle > span, diff --git a/components/product/ProductCard/ProductCard.tsx b/components/product/ProductCard/ProductCard.tsx index 28bbaae6a..b0d0f838c 100644 --- a/components/product/ProductCard/ProductCard.tsx +++ b/components/product/ProductCard/ProductCard.tsx @@ -9,9 +9,8 @@ import WishlistButton from '@components/wishlist/WishlistButton' interface Props { className?: string product: Product - variant?: 'slim' | 'simple' + variant?: 'default' | 'slim' | 'simple' imgProps?: Omit - noNameTag?: boolean } const placeholderImg = '/product-img-placeholder.svg' @@ -19,35 +18,42 @@ const placeholderImg = '/product-img-placeholder.svg' const ProductCard: FC = ({ className, product, - variant, + variant = 'default', imgProps, - noNameTag = false, ...props }) => ( - - {variant === 'slim' ? ( -
- {!noNameTag && ( + + {variant === 'slim' && ( + <> +
{product.name}
- )} - {product?.images && ( - {product.name - )} -
- ) : ( + {product?.images && ( + {product.name + )} +
+ + )} + + {variant === 'simple' && ( <> {process.env.COMMERCE_WISHLIST_ENABLED && ( = ({ /> )}
- {!noNameTag && ( -
-

- {product.name} -

- - {product.price.value} -   - {product.price.currencyCode} - -
+
+

+ {product.name} +

+ + {product.price.value} +   + {product.price.currencyCode} + +
+
+
+ {product?.images && ( + {product.name )}
+ + )} + + {variant === 'default' && ( + <> + {process.env.COMMERCE_WISHLIST_ENABLED && ( + + )} +
+
+

+ {product.name} +

+ + {product.price.value} +   + {product.price.currencyCode} + +
+
{product?.images && ( = ({ product, relatedProducts }) => {
-
+
Related Products
{relatedProducts.map((p) => ( @@ -185,9 +185,9 @@ const ProductView: FC = ({ product, relatedProducts }) => { > *:nth-child(6n + 1), - & > *:nth-child(6n + 5) { + & > *:nth-child(6n + 1) { @apply bg-violet; } - & > *:nth-child(6n + 5) { - @apply bg-blue; + & > *:nth-child(6n + 2) { + @apply bg-accent-8; } & > *:nth-child(6n + 3) { @@ -76,12 +75,12 @@ } &.filled { - & > *:nth-child(6n + 2) { - @apply bg-blue; + & > *:nth-child(6n + 1) { + @apply bg-violet; } - & > *:nth-child(6n + 4) { - @apply bg-violet; + & > *:nth-child(6n + 2) { + @apply bg-accent-8; } & > *:nth-child(6n + 3) { diff --git a/pages/index.tsx b/pages/index.tsx index e0182da08..99a9f614b 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -42,7 +42,7 @@ export default function Home({ }: InferGetStaticPropsType) { return ( <> - + {products.slice(0, 3).map((product, i) => ( - + {products.slice(0, 3).map((product, i) => (