From 96784c02c73ade25c14d64ebda5d8c1708f135fa Mon Sep 17 00:00:00 2001 From: Md Asif Date: Sat, 21 Dec 2024 20:34:16 +0530 Subject: [PATCH] Add ToastProvider component and useToast hook; update CabinetMaintenance for toast notifications; enhance Button styles and Tailwind CSS configuration --- src/App.jsx | 29 ++++++++++------- src/components/Button.jsx | 2 +- src/components/Toast.jsx | 56 ++++++++++++++++++++++++++++++++ src/hooks/useToast.js | 4 +++ src/pages/CabinetMaintenance.jsx | 13 +++++--- src/util/util.js | 6 +++- tailwind.config.js | 29 +++++++++++++++++ 7 files changed, 120 insertions(+), 19 deletions(-) create mode 100644 src/components/Toast.jsx create mode 100644 src/hooks/useToast.js diff --git a/src/App.jsx b/src/App.jsx index ea5d88f..b0eca92 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,15 +1,20 @@ -import { Outlet } from "react-router-dom" -import Header from "./components/Header" -import Footer from "./components/Footer" +import { Outlet } from "react-router-dom"; +import Header from "./components/Header"; +import Footer from "./components/Footer"; +import { ToastProvider } from "./components/Toast"; function App() { - return
-
-
- -
-
-
-} + return ( + +
+
+
+ +
+
+
+
+ ); +} -export default App +export default App; diff --git a/src/components/Button.jsx b/src/components/Button.jsx index fd6c00e..eaae491 100644 --- a/src/components/Button.jsx +++ b/src/components/Button.jsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; function Button({text, onClick}) { return (