Skip to content

Commit

Permalink
feat: add hideToastable method
Browse files Browse the repository at this point in the history
  • Loading branch information
enestatli committed Dec 19, 2023
1 parent 3851ac3 commit 48032c3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/utils/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,12 @@ export const processNextToastable = () => {
* @param item ToastableBodyParams
* */
export const showToastable = (item: ToastableBodyParams) => enqueue(item);
/**
* Hide the current toastable
*
*/
export const hideToastable = () => {
toastableRef.current?.hideToastable();
};

export const toastableRef = createRef<ToastableRef>();

0 comments on commit 48032c3

Please sign in to comment.