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:
parent
39e801f6f3
commit
e24ea4afeb
5 changed files with 56 additions and 21 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue