Skip to content

Commit

Permalink
fix(toast): #5692 provide default options when passing options to use…
Browse files Browse the repository at this point in the history
…Toast
  • Loading branch information
takethefake committed Mar 7, 2022
1 parent 577aeb9 commit 9a58c7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/nasty-lobsters-hope.md
@@ -0,0 +1,5 @@
---
"@chakra-ui/toast": patch
---

use default options as well when providing options to useToast
2 changes: 1 addition & 1 deletion packages/toast/src/use-toast.tsx
Expand Up @@ -217,7 +217,7 @@ export function useToast(options?: UseToastOptions) {
colorMode,
setColorMode,
toggleColorMode,
defaultOptions: toastOptions.current,
defaultOptions: { ...defaults, ...toastOptions.current },
})
}, [theme, setColorMode, toggleColorMode, colorMode, toastOptions])
}
Expand Down

0 comments on commit 9a58c7a

Please sign in to comment.