Browse Source

navbar style

master
azri 1 week ago
parent
commit
b0d8361b42
1 changed files with 27 additions and 20 deletions
  1. 27
    20
      src/components/Navbar/Navbar.jsx

+ 27
- 20
src/components/Navbar/Navbar.jsx View File

206
             position: "relative",
206
             position: "relative",
207
             cursor: "pointer",
207
             cursor: "pointer",
208
             transition: "transform 0.3s ease",
208
             transition: "transform 0.3s ease",
209
-            ":hover": {
210
-              transform: "scale(1.1)"
211
-            }
212
           }}
209
           }}
213
           onClick={() => {
210
           onClick={() => {
214
             sessionStorage.setItem('amber-select-collection', JSON.stringify(colletion))
211
             sessionStorage.setItem('amber-select-collection', JSON.stringify(colletion))
215
             sessionStorage.setItem('amber-select-product-type', displayCollection.productType)
212
             sessionStorage.setItem('amber-select-product-type', displayCollection.productType)
216
             window.location.href = `/products`;
213
             window.location.href = `/products`;
217
           }}
214
           }}
215
+        ></Box>
216
+        <Typography
217
+          variant="body1"
218
+          sx={{
219
+            mt:1,
220
+            color: "black",
221
+            fontWeight: "400",
222
+          }}
218
         >
223
         >
219
-          <Typography
220
-            variant="body1"
221
-            sx={{
222
-              color: "white",
223
-              fontWeight: "bolder",
224
-              position: "absolute",
225
-              top: "50%",
226
-              left: "50%",
227
-              transform: "translate(-50%, -50%)"
228
-            }}
229
-          >
230
-            {colletion?.title?.toUpperCase()}
231
-          </Typography>
232
-        </Box>
224
+          {colletion?.title?.toUpperCase()}
225
+        </Typography>
233
       </SwiperSlide>
226
       </SwiperSlide>
234
     )
227
     )
235
 
228
 
383
                 <Typography variant="body2"
376
                 <Typography variant="body2"
384
                   className="navItem"
377
                   className="navItem"
385
                   sx={{
378
                   sx={{
386
-                    fontSize:"0.95rem",
379
+                    fontSize: "0.95rem",
387
                     fontWeight: "400",
380
                     fontWeight: "400",
388
                     color: (isAtTop) ? "white" : "black",
381
                     color: (isAtTop) ? "white" : "black",
389
                     transition: "all 0.3s ease-in-out",
382
                     transition: "all 0.3s ease-in-out",
390
                     ":hover": {
383
                     ":hover": {
391
                       color: "#95AAC5 !important"
384
                       color: "#95AAC5 !important"
392
-                    }
385
+                    },
386
+                    "&::after": {
387
+                      content: '""',
388
+                      position: "absolute",
389
+                      left: "50%",
390
+                      transform: "translateX(-50%)",
391
+                      bottom: 2,
392
+                      width: "0%",
393
+                      height: "2px", // Thickness of the underline
394
+                      backgroundColor: "#95AAC5",
395
+                      transition: "width 0.3s ease-in-out",
396
+                    },
397
+                    ":hover::after": {
398
+                      width: "50%", // Expands on hover
399
+                    },
393
                   }}>{productType}</Typography>
400
                   }}>{productType}</Typography>
394
               </Button>))}
401
               </Button>))}
395
 
402
 
497
       {showSearch && <SearchProduct onClose={() => { setShowSearch(false) }} />}
504
       {showSearch && <SearchProduct onClose={() => { setShowSearch(false) }} />}
498
 
505
 
499
       <MobileNav open={openSideMenu} menu={navItem} onClose={() => { setOpenSideMenu(false) }} />
506
       <MobileNav open={openSideMenu} menu={navItem} onClose={() => { setOpenSideMenu(false) }} />
500
-      <SideCart open={openSideCart} onClose={()=>{setOpenSideCart(false)}}/>
507
+      <SideCart open={openSideCart} onClose={() => { setOpenSideCart(false) }} />
501
 
508
 
502
     </>
509
     </>
503
   );
510
   );

Loading…
Cancel
Save