1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

added more toasts

This commit is contained in:
Fedor Katurov 2022-01-04 21:22:44 +07:00
parent 39e801f6f3
commit e24ea4afeb
5 changed files with 56 additions and 21 deletions

View file

@ -17,4 +17,16 @@ export const showToastError = (message: string) =>
className: classNames(styles.toast, styles.error),
});
export const showToastSuccess = (message: string) =>
toast.success(t => <span onClick={() => toast.dismiss(t.id)}>{message}</span>, {
...defaultOptions,
className: classNames(styles.toast, styles.success),
});
export const showToastInfo = (message: string) =>
toast.success(t => <span onClick={() => toast.dismiss(t.id)}>{message}</span>, {
...defaultOptions,
className: classNames(styles.toast, styles.info),
});
export const hideToast = (id: string) => toast.dismiss(id);