From 0b77e0cfeeb21ce547fadec75625cd07d311303d Mon Sep 17 00:00:00 2001 From: Amit Roy Date: Wed, 7 Aug 2024 10:53:40 +0530 Subject: [PATCH] Styles: side bar done and header --- src/app/globals.scss | 8 +- src/components/wrapper/dashboardWrapper.tsx | 100 ++++++++++++---- src/utilities/svgConstant.tsx | 120 ++++++++++++-------- 3 files changed, 157 insertions(+), 71 deletions(-) diff --git a/src/app/globals.scss b/src/app/globals.scss index 71c01ee..9f16bd8 100644 --- a/src/app/globals.scss +++ b/src/app/globals.scss @@ -2,7 +2,7 @@ @use "../theme/sass/helper" as *; :root { - --bg_white: 0 0% 100%; + --bg_white: #ffffff; --background: 232 95% 7%; --foreground: 222.2 84% 4.9%; @@ -14,7 +14,7 @@ --primary: #6290cb; /* #6290CB */ --primary_light: #dae7f9; /* #DAE7F9 */ - --primary_bg_03: 230 68% 16%; /* #0D1645 */ + --primary_Active_text: #6c96cf; /* #6C96CF */ --inputPrimary: 227 49% 17%; /* #161F40 */ --primary-foreground: 210 40% 98%; @@ -24,6 +24,10 @@ --secondary_bg_03: 231 41% 21%; /* #20274D */ --secondary_bg_04: 224, 100%, 63%; /* #4175FF */ + --primary_text_clr: #121926; /* #121926 */ + + --clr_gray_100: #f5f5f5; /* #F5F5F5 */ + --input-border-default: #e0e3e7; --input-border-hover: #b2bac2; diff --git a/src/components/wrapper/dashboardWrapper.tsx b/src/components/wrapper/dashboardWrapper.tsx index ba2f9f6..fdc46a1 100644 --- a/src/components/wrapper/dashboardWrapper.tsx +++ b/src/components/wrapper/dashboardWrapper.tsx @@ -1,12 +1,12 @@ "use client"; // This ensures the file is a client component import * as React from "react"; -import AppBar from "@mui/material/AppBar"; +import AppBar, { AppBarProps } from "@mui/material/AppBar"; import Box from "@mui/material/Box"; import CssBaseline from "@mui/material/CssBaseline"; import Drawer from "@mui/material/Drawer"; import IconButton from "@mui/material/IconButton"; -import InboxIcon from "@mui/icons-material/MoveToInbox"; +import Avatar from "@mui/material/Avatar"; import List from "@mui/material/List"; import ListItem from "@mui/material/ListItem"; import ListItemButton from "@mui/material/ListItemButton"; @@ -20,6 +20,7 @@ import { useState } from "react"; import { UTILITY_CONSTANT } from "@/utilities/utilityConstant"; import styles from "./DashboardWrapper.module.scss"; import styled from "@emotion/styled"; +import { BUILDING, GEAR } from "@/utilities/svgConstant"; const drawerWidth = 260; @@ -32,10 +33,37 @@ const CssList = styled(List)({ "& .MuiListItemIcon-root": { minWidth: "34px", }, + "&:hover": { + backgroundColor: "var(--primary_light)", + color: "var(--primary_Active_text)", + + "& .MuiListItemIcon-root": { + color: "var(--primary_Active_text)", + }, + }, + }, + "&.Mui-selected": { + backgroundColor: "transparent", + "& .MuiButtonBase-root": { + backgroundColor: "var(--primary_light)", + color: "var(--primary_Active_text)", + "& .MuiListItemIcon-root": { + color: "var(--primary_Active_text)", + }, + }, }, }, }); +const CssAppBar = styled(AppBar)({ + boxShadow: "none", + backgroundColor: "var(--bg_white)", + color: "var(--primary_text_clr)", + "& .MuiToolbar-root": { + minHeight: "72px", + }, +}); + interface Props { window?: () => Window; children: React.ReactNode; @@ -61,10 +89,11 @@ export default function DashboardWrapper(props: Props) { setMobileOpen(!mobileOpen); } }; + const [activeIndex, setActiveIndex] = useState(null); const drawer = ( <> - + Logo */} {["Project Table"].map((text, index) => ( - + setActiveIndex(index)} // Add this line to handle click events + > - {index % 2 === 0 ? : } + {index % 2 === 0 ? : } @@ -98,28 +132,56 @@ export default function DashboardWrapper(props: Props) { className={styles.dashboard_main} > - - - + + + + + + Responsive drawer + + + - - - - Responsive drawer - + + + - + { - return ( - <> - - - - - ); -}; +// Import necessary functions and types +import React from "react"; +import { createSvgIcon } from "@mui/material/utils"; +// Define the SVG component using createSvgIcon export const BUILDING = createSvgIcon( , "Building" ); + +export const GEAR = createSvgIcon( + + + + + + + + + + + , + "Gear" +);