From 8502414f84287c7296a4b5e00392e2d03d7e2229 Mon Sep 17 00:00:00 2001 From: Thomas Cristina de Carvalho Date: Sat, 3 Feb 2024 01:56:26 -0500 Subject: [PATCH] Add no drag attribute Update cart input text size Update test size --- app/components/QuantitySelector.tsx | 7 +++++-- app/components/cart/CartDetails.tsx | 2 +- app/components/cart/CartDiscounts.tsx | 11 ++++++++--- app/components/cart/CartLineItem.tsx | 3 ++- app/components/ui/Button.tsx | 2 +- app/components/ui/Input.tsx | 2 +- 6 files changed, 18 insertions(+), 9 deletions(-) diff --git a/app/components/QuantitySelector.tsx b/app/components/QuantitySelector.tsx index 35cda18b..3413f930 100644 --- a/app/components/QuantitySelector.tsx +++ b/app/components/QuantitySelector.tsx @@ -26,9 +26,10 @@ function Button( variant === 'increase' && 'Increase quantity', ])} className={cx([ - 'size-10 transition hover:bg-muted', + 'size-10 transition hover:bg-muted [&>*]:pointer-events-none', variant === 'decrease' && 'disabled:opacity-30', ])} + data-vaul-no-drag name={cx([ variant === 'decrease' && 'decrease-quantity', variant === 'increase' && 'increase-quantity', @@ -50,7 +51,9 @@ function Button( function Value(props: {children: React.ReactNode}) { return ( -
{props.children}
+
+ {props.children} +
); } diff --git a/app/components/cart/CartDetails.tsx b/app/components/cart/CartDetails.tsx index 23c05fb6..9b3ebada 100644 --- a/app/components/cart/CartDetails.tsx +++ b/app/components/cart/CartDetails.tsx @@ -58,7 +58,7 @@ function CartCheckoutActions({checkoutUrl}: {checkoutUrl: string}) { return (
diff --git a/app/components/cart/CartLineItem.tsx b/app/components/cart/CartLineItem.tsx index 2b660049..f7cda211 100644 --- a/app/components/cart/CartLineItem.tsx +++ b/app/components/cart/CartLineItem.tsx @@ -152,7 +152,8 @@ function ItemRemoveButton({lineId}: {lineId: CartLine['id']}) { route={cartPath} >