From f14e526d9fb3c1a661780e29b925f94d68ec0286 Mon Sep 17 00:00:00 2001 From: Maharshi Alpesh Date: Fri, 10 Jan 2025 17:12:23 +0530 Subject: [PATCH] fix: fixing autoclose in timeout --- packages/components/toast/src/use-toast.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/toast/src/use-toast.ts b/packages/components/toast/src/use-toast.ts index 1248883347..3d3c5c2d41 100644 --- a/packages/components/toast/src/use-toast.ts +++ b/packages/components/toast/src/use-toast.ts @@ -316,7 +316,7 @@ export function useToast(originalProps: UseToastProps) } }, style: { - opacity: Math.max(0, 1 - dragValue / SWIPE_THRESHOLD), + opacity: drag ? Math.max(0, 1 - dragValue / (SWIPE_THRESHOLD + 20)) : undefined, }, ...mergeProps(props, otherProps, toastProps, hoverProps), }),