Browse Source

fix navbar hover styling

master
azri 1 week ago
parent
commit
9341e1957d

+ 9
- 4
src/components/Navbar/Navbar.jsx View File

263
             backdropFilter: "none !important",
263
             backdropFilter: "none !important",
264
             '& .navItem':{
264
             '& .navItem':{
265
               color:"black !important"
265
               color:"black !important"
266
-            }
266
+            },
267
+            '& .navItem:hover':{
268
+              color:"#95AAC5 !important"
269
+            },
267
           }
270
           }
268
         }}
271
         }}
269
         onMouseLeave={() => {
272
         onMouseLeave={() => {
312
 
315
 
313
             <IconButton
316
             <IconButton
314
               onClick={() => setOpen(true)}
317
               onClick={() => setOpen(true)}
318
+              className="navItem"
315
               sx={{
319
               sx={{
316
                 backgroundColor: "transparent",
320
                 backgroundColor: "transparent",
317
-                color: "white",
321
+                color: (isAtTop) ? "white" : "black",
318
                 "&:hover": {
322
                 "&:hover": {
319
                   backgroundColor: "rgba(0, 0, 0, 0.1)",
323
                   backgroundColor: "rgba(0, 0, 0, 0.1)",
320
                 },
324
                 },
343
                 position: "relative",
347
                 position: "relative",
344
                 ':hover': {
348
                 ':hover': {
345
                   backgroundColor: "rgba(0,0,0,0)",
349
                   backgroundColor: "rgba(0,0,0,0)",
346
-                  color: "#95AAC5"
347
                 }
350
                 }
348
               }}
351
               }}
349
               color="inherit"
352
               color="inherit"
363
                   color: (isAtTop) ? "white" : "black",
366
                   color: (isAtTop) ? "white" : "black",
364
                   transition: "all 0.3s ease-in-out",
367
                   transition: "all 0.3s ease-in-out",
365
                   ":hover": {
368
                   ":hover": {
366
-                    color: "#95AAC5"
369
+                    color: "#95AAC5 !important"
367
                   }
370
                   }
368
                 }}>{productType}</Typography>
371
                 }}>{productType}</Typography>
369
             </Button>))}
372
             </Button>))}
402
 
405
 
403
             <IconButton>
406
             <IconButton>
404
               <SearchIcon className="navItem" style={{
407
               <SearchIcon className="navItem" style={{
408
+                transition: "all 0.3s ease-in-out",
405
                 color: (isAtTop) ? "white" : "black",
409
                 color: (isAtTop) ? "white" : "black",
406
               }} />
410
               }} />
407
             </IconButton>
411
             </IconButton>
408
 
412
 
409
             <Badge sx={{ cursor: "pointer" }} onClick={() => { window.location.href = "/cart" }} badgeContent={cartAmount} color="primary">
413
             <Badge sx={{ cursor: "pointer" }} onClick={() => { window.location.href = "/cart" }} badgeContent={cartAmount} color="primary">
410
               <LocalMallIcon className="navItem" style={{
414
               <LocalMallIcon className="navItem" style={{
415
+                transition: "all 0.3s ease-in-out",
411
                 color: (isAtTop) ? "white" : "black",
416
                 color: (isAtTop) ? "white" : "black",
412
               }} />
417
               }} />
413
             </Badge>
418
             </Badge>

+ 3
- 2
src/components/Navbar/components/MobileNav/MobileNav.jsx View File

7
     <Drawer
7
     <Drawer
8
       open={open}
8
       open={open}
9
       onClose={onClose}
9
       onClose={onClose}
10
+      onClick={()=>{onClose()}}
10
       sx={{
11
       sx={{
11
         "& .MuiDrawer-paper": {
12
         "& .MuiDrawer-paper": {
12
-          backgroundColor: "black",
13
+          backgroundColor: "white",
13
           color: "white",
14
           color: "white",
14
-          width: 250,
15
+          width: "100%",
15
         },
16
         },
16
       }}
17
       }}
17
     >
18
     >

Loading…
Cancel
Save