fix(toast): shouldShowTimeoutProgess typo (#4858)

* fix(toast): shouldShowTimeoutProgess typo

* fix(toast): shouldShowTimeoutProgess typo
This commit is contained in:
աӄա 2025-02-26 20:20:15 +08:00 committed by GitHub
parent 29df4f5317
commit fd446dac2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 5 deletions

View File

@ -0,0 +1,5 @@
---
"@heroui/toast": patch
---
fix shouldShowTimeoutProgess typo (#4856)

View File

@ -100,7 +100,7 @@ export interface ToastProps extends ToastVariantProps {
/**
* should apply styles to indicate timeout progress
*/
shouldShowTimeoutProgess?: boolean;
shouldShowTimeoutProgress?: boolean;
/**
* The severity of the toast. This changes the icon without having to change the color.
* @default "default"
@ -155,7 +155,7 @@ export function useToast<T extends ToastProps>(originalProps: UseToastProps<T>)
toastOffset = 0,
motionProps,
timeout = 6000,
shouldShowTimeoutProgess = false,
shouldShowTimeoutProgress = false,
icon,
onClose,
severity,
@ -233,7 +233,7 @@ export function useToast<T extends ToastProps>(originalProps: UseToastProps<T>)
if (progressBarRef.current) {
progressBarRef.current.style.width = `${
shouldShowTimeoutProgess ? progressRef.current : 0
shouldShowTimeoutProgress ? progressRef.current : 0
}%`;
}
@ -251,7 +251,7 @@ export function useToast<T extends ToastProps>(originalProps: UseToastProps<T>)
};
}, [
timeout,
shouldShowTimeoutProgess,
shouldShowTimeoutProgress,
state,
isToastHovered,
index,

View File

@ -110,7 +110,7 @@ const ShowTimeoutProgressTemplate = (args: ToastProps) => {
title: "Toast Title",
description: "Toast Description",
timeout: 3000,
shouldShowTimeoutProgess: true,
shouldShowTimeoutProgress: true,
...args,
});
}}