test notifications
This commit is contained in:
1 parent
cb5d8c3468
commit
36d13d556e
3 files changed
+23
-3
No files matched your search
@@ -2,7 +2,14 @@ import { toast, type ToastOptions } from "react-toastify";
|
||||
export const useToast = () => {
|
||||
const showToast = (message: string, options?: ToastOptions) => {
|
||||
toast.dismiss();
|
||||
toast(message, options);
|
||||
const baseStyle: React.CSSProperties = {
|
||||
whiteSpace: "pre-line",
|
||||
wordBreak: "break-word",
|
||||
};
|
||||
toast(message, {
|
||||
...options,
|
||||
style: { ...baseStyle, ...(options?.style || {}) },
|
||||
});
|
||||
};
|
||||
|
||||
const toastSuccess = (msg: string, opts?: ToastOptions) =>
|
||||
|
||||
Reference in new issue
Block a user