From 6bb10060e54f57d619ded204aaac915e60840fcd Mon Sep 17 00:00:00 2001 From: Venessa Kuchenik Date: Wed, 9 Jul 2025 12:01:32 -0700 Subject: [PATCH 1/2] active buttons highlighted the current active button is now highlighting a bolder color. --- client/src/components/sidebar.jsx | 47 ++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/client/src/components/sidebar.jsx b/client/src/components/sidebar.jsx index 894bbf4..d304cf1 100644 --- a/client/src/components/sidebar.jsx +++ b/client/src/components/sidebar.jsx @@ -10,7 +10,7 @@ export const PushPin = createIcon({ fill: "none", path: ( <> - + ), }); @@ -58,6 +58,7 @@ export const Users = createIcon({ export default function Sidebar () { const [isOpen, setIsOpen] = useState(true); + const [activeButton, setActiveButton] = useState("Dashboard") return ( <> @@ -71,14 +72,24 @@ export default function Sidebar () { justifyContent="start" alignItems="start" gap={4} paddingTop={4} - paddingLeft={8} paddingRight={8} + paddingLeft={10} paddingRight={8} > - setIsOpen(!isOpen)}> - - - - - + setIsOpen(!isOpen)}> + + + + + )} @@ -96,11 +107,21 @@ export default function Sidebar () { setIsOpen(!isOpen)}> - - - - - + setActiveButton("Dashboard")} bg={activeButton === "Dashboard" ? "#A4B6B6" : "transparent"}> + + + setActiveButton("Global")} bg={activeButton === "Global" ? "#A4B6B6" : "transparent"}> + + + setActiveButton("Regional")} bg={activeButton === "Regional" ? "#A4B6B6" : "transparent"}> + + + setActiveButton("Volcano")} bg={activeButton === "Volcano" ? "#A4B6B6" : "transparent"}> + + + setActiveButton("Admin")} bg={activeButton === "Admin" ? "#A4B6B6" : "transparent"}> + + )} From 0190bf7c72abc36859324153a57538cb0224376d Mon Sep 17 00:00:00 2001 From: Venessa Kuchenik Date: Thu, 10 Jul 2025 07:49:03 -0700 Subject: [PATCH 2/2] dark mode forgot to switch branches. Started working on dark mode by creating a theme for the app --- client/src/App.jsx | 4 ++-- client/src/components/sidebar.jsx | 4 ++-- client/src/main.jsx | 3 ++- client/src/theme.js | 14 ++++++++++++++ 4 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 client/src/theme.js diff --git a/client/src/App.jsx b/client/src/App.jsx index 8a0a2b9..591c1c2 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -3,12 +3,12 @@ import Header from './components/header.jsx'; import Sidebar from './components/sidebar.jsx'; import Widget from './components/Widget.jsx' import { Grid, GridItem } from "@chakra-ui/react" -import { Box } from "@chakra-ui/react" + function App() { return ( - setIsOpen(!isOpen)}> + setIsOpen(!isOpen)}> diff --git a/client/src/main.jsx b/client/src/main.jsx index ff458ce..e16b3ff 100644 --- a/client/src/main.jsx +++ b/client/src/main.jsx @@ -5,10 +5,11 @@ import './index.css' import 'react-grid-layout/css/styles.css' import 'react-resizable/css/styles.css' import App from './App.jsx' +import theme from './theme.js' createRoot(document.getElementById('root')).render( - + , diff --git a/client/src/theme.js b/client/src/theme.js new file mode 100644 index 0000000..20508f3 --- /dev/null +++ b/client/src/theme.js @@ -0,0 +1,14 @@ +import { extendTheme } from "@chakra-ui/react"; + +const theme = extendTheme({ + semanticTokens: { + colors: { + primary: { + defualt: 'white', + _dark: 'grey.800' + }, + }, + }, +}); + +export default theme; \ No newline at end of file