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 ( - + ), }); @@ -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={14} paddingRight={3} > - 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"}> + + )} 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