From e8cac357c0ceaf45436d10bc83c71a8ba6225410 Mon Sep 17 00:00:00 2001 From: Fadi Khadra Date: Tue, 1 Nov 2022 12:21:56 +0100 Subject: [PATCH] allow to specify TData for update --- src/core/toast.ts | 5 ++++- src/types/index.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/toast.ts b/src/core/toast.ts index ec83ef9b..54b513c6 100644 --- a/src/core/toast.ts +++ b/src/core/toast.ts @@ -233,7 +233,10 @@ toast.isActive = (id: Id) => { return isToastActive; }; -toast.update = (toastId: Id, options: UpdateOptions = {}) => { +toast.update = ( + toastId: Id, + options: UpdateOptions = {} +) => { // if you call toast and toast.update directly nothing will be displayed // this is why I defered the update setTimeout(() => { diff --git a/src/types/index.ts b/src/types/index.ts index abf5935c..3b02d6f9 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -166,7 +166,7 @@ interface CommonOptions { /** * @deprecated * ⚠️ Will be removed in the next major release. You can pass a react component with you handler instead. - * + * * Fired when clicking inside toaster */ onClick?: (event: React.MouseEvent) => void;