From c779a31bfa51f9947936bd353f1c7b6abeefec03 Mon Sep 17 00:00:00 2001 From: "theis.gaedigk" Date: Wed, 20 Aug 2025 13:38:54 +0200 Subject: [PATCH] updated toastify design --- frontend/src/main.tsx | 6 +++--- frontend/src/utils/toastify.ts | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 663e90c..4ce7b43 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -2,7 +2,7 @@ import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; import "./index.css"; import App from "./App.tsx"; -import { ToastContainer } from "react-toastify"; +import { ToastContainer, Flip } from "react-toastify"; import "react-toastify/dist/ReactToastify.css"; import { QueryClientProvider } from "@tanstack/react-query"; import { queryClient } from "./utils/queryClient"; @@ -18,11 +18,11 @@ createRoot(document.getElementById("root")!).render( newestOnTop closeOnClick rtl={false} - pauseOnFocusLoss={false} + pauseOnFocusLoss draggable pauseOnHover theme="colored" - style={{ zIndex: 9999 }} + transition={Flip} /> diff --git a/frontend/src/utils/toastify.ts b/frontend/src/utils/toastify.ts index 9233749..51ba790 100644 --- a/frontend/src/utils/toastify.ts +++ b/frontend/src/utils/toastify.ts @@ -1,17 +1,18 @@ -import { toast, type ToastOptions } from "react-toastify"; +import { toast, Flip, type ToastOptions } from "react-toastify"; export type ToastType = "success" | "error" | "info" | "warning"; export const myToast = (message: string, msgType: ToastType) => { let config: ToastOptions = { position: "top-right", - autoClose: 5000, + autoClose: 3000, hideProgressBar: false, closeOnClick: true, pauseOnHover: true, draggable: true, progress: undefined, - theme: "light", + theme: "colored", + transition: Flip, }; toast[msgType](message, config); };