From 6955cc2f017f11dfedd758c64f679ee2b1c17615 Mon Sep 17 00:00:00 2001 From: EphemeralFog Date: Tue, 20 Jan 2026 23:53:17 +0330 Subject: [PATCH] Fix toast component low z-index and some design issues --- src/components/Toast.tsx | 46 ++++++++++++++++----------------- src/index.tsx | 56 ++++++++++++++++++++-------------------- 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/src/components/Toast.tsx b/src/components/Toast.tsx index bd02a0c..279bdbf 100644 --- a/src/components/Toast.tsx +++ b/src/components/Toast.tsx @@ -1,27 +1,27 @@ import type { ReactNode } from "react"; type Props = { - children: ReactNode; - onClose: () => void; + children: ReactNode; + onClose: () => void; }; export default function Toast({ children, onClose }: Props) { - return ( -
-
-
-
-
-
- - - {children} - - - -
- ); -} \ No newline at end of file + return ( +
+
+ {/*
*/} + + + {children} + + + +
+ ); +} diff --git a/src/index.tsx b/src/index.tsx index 14876a1..c751b35 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -6,42 +6,42 @@ import Modal from "./components/Modal"; import BackgroundParticles from "./components/Particles"; import Bokhary from "./components/Bokhary"; import Toast from "./components/Toast"; -import TimePassed from "./components/TimePassed" +import TimePassed from "./components/TimePassed"; import "@fontsource/vazirmatn"; import "./index.css"; function App() { - const [modalOpen, setModalOpen] = useState(false); - const [toast, showToast] = useState(true); + const [modalOpen, setModalOpen] = useState(false); + const [toast, showToast] = useState(true); + return ( + + - return ( - +
+
+ {toast && ( + showToast(false)}> + + + )} +
+
+ +
- +
+ setModalOpen(true)} + /> +
+
-
-
- {toast && ( - showToast(false)}> - - - )} -
-
- -
- -
- setModalOpen(true)} /> -
-
- - setModalOpen(false)} /> - -
- ); + setModalOpen(false)} /> +
+ ); } -createRoot(document.getElementById("root")!).render(); \ No newline at end of file +createRoot(document.getElementById("root")!).render();