From 1b36efba6dc9c0dcf59cec32ba93775d42352587 Mon Sep 17 00:00:00 2001 From: varunvaatsalya Date: Fri, 4 Oct 2024 20:17:44 +0530 Subject: [PATCH 1/6] Dark mode ui implemnt & dropdown section Signed-off-by: varunvaatsalya --- src/App.js | 74 ++++----- src/components/BulkQRCode.js | 14 +- src/components/CategorySelector.js | 4 +- src/components/ColorPicker.js | 26 ++-- src/components/DownloadButton.js | 2 +- src/components/FileUploader.js | 6 +- src/components/ImageQRCodeGenerator.js | 22 +-- src/components/Navbar.js | 199 ++++++++++--------------- src/components/PDFToQR.js | 20 +-- src/components/Profile.js | 44 +++--- src/components/QRCodeCanvas.js | 2 +- src/components/QRCodeGenerator.js | 8 +- src/components/QRScanner.js | 12 +- src/components/Setting.js | 40 ++--- src/components/SizeSlider.js | 8 +- src/components/SocialMedia.js | 14 +- src/components/Support.js | 18 +-- src/components/VCardForm.js | 12 +- src/components/WifiForm.js | 12 +- src/context/ThemeContext.js | 41 +++-- src/pages/DashboardPage.js | 19 +-- src/pages/Home.js | 55 +++---- src/pages/ProfilePage.js | 2 +- src/pages/QRCodePage.js | 4 +- tailwind.config.js | 1 + 25 files changed, 315 insertions(+), 344 deletions(-) diff --git a/src/App.js b/src/App.js index ae2e449..d56fd12 100644 --- a/src/App.js +++ b/src/App.js @@ -1,43 +1,45 @@ -import React from 'react'; -import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; -import Navbar from './components/Navbar'; -import Home from './pages/Home'; -import DashboardPage from './pages/DashboardPage'; -import QRCodePage from './pages/QRCodePage'; -import ProfilePage from './pages/ProfilePage'; -import Login from './components/Login'; -import Register from './components/Register'; -import { AuthProvider } from './context/AuthContext'; -import Support from './components/Support'; -import Settings from './components/Setting'; -import ImageQRCodeGenerator from './components/ImageQRCodeGenerator'; -import SocialMedia from './components/SocialMedia'; -import BulkQRCode from './components/BulkQRCode'; -import QRScanner from './components/QRScanner'; -import PdfQRCodeGenerator from './components/PDFToQR'; -import { ThemeProvider } from './context/ThemeContext'; +import React, { useEffect, useState } from "react"; +import { BrowserRouter as Router, Route, Routes } from "react-router-dom"; +import Navbar from "./components/Navbar"; +import Home from "./pages/Home"; +import DashboardPage from "./pages/DashboardPage"; +import QRCodePage from "./pages/QRCodePage"; +import ProfilePage from "./pages/ProfilePage"; +import Login from "./components/Login"; +import Register from "./components/Register"; +import { AuthProvider } from "./context/AuthContext"; +import Support from "./components/Support"; +import Settings from "./components/Setting"; +import ImageQRCodeGenerator from "./components/ImageQRCodeGenerator"; +import SocialMedia from "./components/SocialMedia"; +import BulkQRCode from "./components/BulkQRCode"; +import QRScanner from "./components/QRScanner"; +import PdfQRCodeGenerator from "./components/PDFToQR"; +import { ThemeProvider } from "./context/ThemeContext"; export default function App() { return ( - - - - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - - + +
+ + + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + +
+
); diff --git a/src/components/BulkQRCode.js b/src/components/BulkQRCode.js index b755b45..14d22d8 100644 --- a/src/components/BulkQRCode.js +++ b/src/components/BulkQRCode.js @@ -42,12 +42,12 @@ export default function BulkQRCode() { }; return ( -
+

Bulk QR Code Generator

-
+

Customize QR Codes

@@ -59,7 +59,7 @@ export default function BulkQRCode() { type="number" value={size} onChange={handleSizeChange} - className="p-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500" + className="p-3 border dark:bg-indigo-950 border-gray-400 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500" min={64} max={512} /> @@ -71,7 +71,7 @@ export default function BulkQRCode() { type="color" value={bgColor} onChange={(e) => setBgColor(e.target.value)} - className="p-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500" + className="p-3 border dark:bg-indigo-950 border-gray-400 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500" />
@@ -81,7 +81,7 @@ export default function BulkQRCode() { type="color" value={fgColor} onChange={(e) => setFgColor(e.target.value)} - className="p-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500" + className="p-3 border dark:bg-indigo-950 border-gray-400 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500" />
@@ -89,14 +89,14 @@ export default function BulkQRCode() {
{urls.map((url, index) => ( -
+
handleUrlChange(index, e.target.value)} - className="w-full p-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500" + className="w-full p-3 border dark:bg-indigo-950 dark:text-gray-200 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500" />
diff --git a/src/components/CategorySelector.js b/src/components/CategorySelector.js index 3159740..04fdec7 100644 --- a/src/components/CategorySelector.js +++ b/src/components/CategorySelector.js @@ -12,7 +12,7 @@ export default function CategorySelector({ category, handleCategoryChange }) { ]; return ( -
+
{categories.map(({ name, icon }) => ( +
-
-
-
-
-
-