diff --git a/src/utils/controller.ts b/src/utils/controller.ts index 3d9af97..a87af73 100644 --- a/src/utils/controller.ts +++ b/src/utils/controller.ts @@ -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();