diff --git a/client/src/App.jsx b/client/src/App.jsx index 8429718..601f6ea 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -2,12 +2,14 @@ import { useState } from 'react' 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 { Grid, GridItem, useRecipe } from "@chakra-ui/react" function App() { + const recipe = useRecipe({ key: "canvas" }); + const styles = recipe(); return ( - diff --git a/client/src/components/sidebar.jsx b/client/src/components/sidebar.jsx index fd89e0e..61b3ca7 100644 --- a/client/src/components/sidebar.jsx +++ b/client/src/components/sidebar.jsx @@ -60,7 +60,7 @@ export const Users = createIcon({ export default function Sidebar () { const variant = useColorModeValue("ghost", "solid") const [isOpen, setIsOpen] = useState(true); - const [activeButton, setActiveButton] = useState("Dashboard") + const [activeButton, setActiveButton] = useState(0) const recipe = useSlotRecipe({ key: "sidebar" }); const styles = recipe(); @@ -69,19 +69,19 @@ export default function Sidebar () { {isOpen ? ( <> setIsOpen(!isOpen)}> - - - - - diff --git a/client/src/theme.js b/client/src/theme.js index b11f184..1883cc2 100644 --- a/client/src/theme.js +++ b/client/src/theme.js @@ -3,11 +3,11 @@ import { defineSlotRecipe, createSystem, defaultConfig, defineConfig, defineReci // RECIPES const headerRecipe = defineRecipe({ base: { - bg: "{secondaryBG}", + bg: "{base200}", color: "text", width: "100%", height: "100%", - borderBottom: "1px solid", + borderBottom: "0px solid", borderBottomColor:"{border}", display: "flex", flexDirection: "row", @@ -16,12 +16,18 @@ const headerRecipe = defineRecipe({ } }); +const canvasRecipe = defineRecipe({ + base: { + bg: "{base200}" + } +}); + const sidebarRecipe = defineSlotRecipe({ slots: ["root", "close_button", "buttons", "dark_mode_button"], base: { root: { - bg: "{primaryBG}", - borderRight: "1px solid", + bg: {base: "{base200}", _dark: "#282828"}, + borderRight: "0px solid", borderColor: "{border}", width: "100%", height: "100%", @@ -33,9 +39,12 @@ const sidebarRecipe = defineSlotRecipe({ p: 2, }, buttons: { - bg: {base: "transparent", _dark: "#414141"}, + bg: "transparent", + _hover: {bg: "{primaryLt}"}, fontSize: "xl", - color: {base: "#19332D", _dark: "#CBCBCB"} + color: {base: "#19332D", _dark: "#CBCBCB"}, + variant: "ghost", + width: "100%" }, } }); @@ -72,7 +81,11 @@ const config = defineConfig({ theme: { semanticTokens: { colors: { - primaryBG: { value: {base: "#FFFFFF", _dark: "#121212"}}, + base100: { value: {base: "#f7f9fa", _dark: "#787b73"}}, + bsae200: { value: {base: "#eef2f6", _dark: "#484c42"}}, + base300: { value: {base: "#dfe5ed", _dark: "#60645a"}}, + primary: { value: {base: "#9cd855", _dark: "#629631"}}, + primaryLt: { value: {base: "#c9e9a0", _dark: "#92948e"}}, secondaryBG: { value: {base: "#EDF1F1", _dark: "#121212"}}, border: {value: {base: "#000000", _dark: "#CBCBCB"}}, text: {value: {base: "#19332D", _dark: "#CBCBCB"}}, @@ -89,6 +102,7 @@ const config = defineConfig({ // sidebar: sidebarRecipe, // sidebarBTN: sidebarBtnRecipe, header: headerRecipe, + canvas: canvasRecipe, }, slotRecipes: { sidebar: sidebarRecipe,