Skip to content

Commit

Permalink
fix(toast): shouldShowTimeoutProgess typo (#4858)
Browse files Browse the repository at this point in the history
* fix(toast): shouldShowTimeoutProgess typo

* fix(toast): shouldShowTimeoutProgess typo
  • Loading branch information
wingkwong authored Feb 26, 2025
1 parent 29df4f5 commit fd446da
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/thirty-candles-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@heroui/toast": patch
---

fix shouldShowTimeoutProgess typo (#4856)
8 changes: 4 additions & 4 deletions packages/components/toast/src/use-toast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
}%`;
}

Expand All @@ -251,7 +251,7 @@ export function useToast<T extends ToastProps>(originalProps: UseToastProps<T>)
};
}, [
timeout,
shouldShowTimeoutProgess,
shouldShowTimeoutProgress,
state,
isToastHovered,
index,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/toast/stories/toast.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const ShowTimeoutProgressTemplate = (args: ToastProps) => {
title: "Toast Title",
description: "Toast Description",
timeout: 3000,
shouldShowTimeoutProgess: true,
shouldShowTimeoutProgress: true,
...args,
});
}}
Expand Down

0 comments on commit fd446da

Please sign in to comment.