From 649a54891c2cd3cee4dd6d44c14f53d95c6634ea Mon Sep 17 00:00:00 2001 From: Chloe Date: Tue, 23 Apr 2024 16:37:32 +0700 Subject: [PATCH] fix: update brand color for PDP Signed-off-by: Chloe --- components/cart/add-to-cart.tsx | 12 ++++-------- components/grid/tile.tsx | 4 ++-- components/price.tsx | 8 ++++++-- components/product/product-description.tsx | 9 +++++---- components/product/variant-selector.tsx | 4 ++-- 5 files changed, 19 insertions(+), 18 deletions(-) diff --git a/components/cart/add-to-cart.tsx b/components/cart/add-to-cart.tsx index 5e7afbff9..2cb9ad384 100644 --- a/components/cart/add-to-cart.tsx +++ b/components/cart/add-to-cart.tsx @@ -1,6 +1,6 @@ 'use client'; -import { PlusIcon } from '@heroicons/react/24/outline'; +import { ShoppingCartIcon } from '@heroicons/react/24/outline'; import clsx from 'clsx'; import { addItem } from 'components/cart/actions'; import LoadingDots from 'components/loading-dots'; @@ -17,7 +17,7 @@ function SubmitButton({ }) { const { pending } = useFormStatus(); const buttonClasses = - 'relative flex w-full items-center justify-center rounded-full bg-blue-600 p-4 tracking-wide text-white'; + 'relative flex w-full items-center justify-center rounded bg-secondary p-4 tracking-wide text-white gap-3'; const disabledClasses = 'cursor-not-allowed opacity-60 hover:opacity-60'; if (!availableForSale) { @@ -35,9 +35,7 @@ function SubmitButton({ aria-disabled className={clsx(buttonClasses, disabledClasses)} > -
- -
+ Add To Cart ); @@ -55,9 +53,7 @@ function SubmitButton({ disabledClasses: pending })} > -
- {pending ? : } -
+ {pending ? : } Add To Cart ); diff --git a/components/grid/tile.tsx b/components/grid/tile.tsx index f79a459f4..0b932e5bc 100644 --- a/components/grid/tile.tsx +++ b/components/grid/tile.tsx @@ -20,10 +20,10 @@ export function GridTileImage({ return (
) => (

{`${new Intl.NumberFormat(undefined, { @@ -17,7 +19,9 @@ const Price = ({ currency: currencyCode, currencyDisplay: 'narrowSymbol' }).format(parseFloat(amount))}`} - {`${currencyCode}`} + {showCurrency && ( + {`${currencyCode}`} + )}

); diff --git a/components/product/product-description.tsx b/components/product/product-description.tsx index 10232ae3d..83567fe7c 100644 --- a/components/product/product-description.tsx +++ b/components/product/product-description.tsx @@ -9,11 +9,12 @@ export function ProductDescription({ product }: { product: Product }) { return ( <>
-

{product.title}

-
+

{product.title}

+
diff --git a/components/product/variant-selector.tsx b/components/product/variant-selector.tsx index 9d47eb5c8..88feaf424 100644 --- a/components/product/variant-selector.tsx +++ b/components/product/variant-selector.tsx @@ -88,8 +88,8 @@ export function VariantSelector({ className={clsx( 'flex min-w-[48px] items-center justify-center rounded-full border bg-neutral-100 px-2 py-1 text-sm dark:border-neutral-800 dark:bg-neutral-900', { - 'cursor-default ring-2 ring-blue-600': isActive, - 'ring-1 ring-transparent transition duration-300 ease-in-out hover:scale-110 hover:ring-blue-600 ': + 'cursor-default ring-2 ring-secondary': isActive, + 'ring-1 ring-transparent transition duration-300 ease-in-out hover:scale-110 hover:ring-secondary ': !isActive && isAvailableForSale, 'relative z-10 cursor-not-allowed overflow-hidden bg-neutral-100 text-neutral-500 ring-1 ring-neutral-300 before:absolute before:inset-x-0 before:-z-10 before:h-px before:-rotate-45 before:bg-neutral-300 before:transition-transform dark:bg-neutral-900 dark:text-neutral-400 dark:ring-neutral-700 before:dark:bg-neutral-700': !isAvailableForSale