Browse Source

change main header size, and new product filter

master
azri 4 weeks ago
parent
commit
49030615d0

BIN
src/assets/images/MAINHEADER-01.webp View File


BIN
src/assets/images/MAINHEADER-02.webp View File


+ 37
- 22
src/components/ProductList/ProductList.jsx View File

@@ -307,7 +307,11 @@ const ProductList = ({ size = 99999 }) => {
307 307
         sx={{
308 308
           display: "flex",
309 309
           justifyContent: "space-between",
310
-          py: 0,
310
+          py: {
311
+            xs:0,
312
+            sm:0,
313
+            md:1
314
+          },
311 315
           flexDirection: {
312 316
             xs: "column",
313 317
             sm: "row",
@@ -317,41 +321,56 @@ const ProductList = ({ size = 99999 }) => {
317 321
           alignItems: "center",
318 322
           backgroundColor: "background.black",
319 323
           color: "white",
320
-          px: 2, // Add padding around the box
324
+          px: {
325
+            xs: 0,
326
+            sm: 0,
327
+            md: 1
328
+          }, // Add padding around the box
321 329
           my: 4,
322 330
         }}
323 331
       >
324 332
         {/* Left Side: Page Title */}
325 333
         <Typography
326 334
           variant="body2"
327
-          sx={{ fontSize: 10, mt: { xs: 1, sm: 1, md: 0 } }}
335
+          sx={{
336
+            fontSize: 10,
337
+            mt: { xs: 1, sm: 1, md: 0 },
338
+            display: { xs: "none", sm: "none", md: "inline", }
339
+          }}
328 340
         >
329
-          {`${filteredProducts.length} Item`}
341
+          {`${filteredProducts.length} Items`}
330 342
         </Typography>
331 343
 
332 344
         {/* Right Side: Option Inputs */}
333 345
         <Box
334 346
           sx={{
335 347
             display: "flex",
336
-            gap: 2,
348
+            flexGrow: { xs: 1, sm: 1, md: 0 },
337 349
             flexDirection: "row",
338
-            flexWrap: "wrap",
339
-            justifyContent: "space-between",
350
+            width: { xs: "100%", sm: "100%", md: "fit-content" },
351
+            gap: {
352
+              xs: 0,
353
+              sm: 0,
354
+              md: 2
355
+            },
340 356
             py: {
341
-              xs: 2,
342
-              sm: 2,
343
-              md: 0,
357
+              xs: 0,
358
+              sm: 0,
359
+              md: 1
360
+            },
361
+            justifyContent: {
362
+              xs: "end",
363
+              sm: "end",
364
+              md: "space-between"
344 365
             },
345 366
           }}
346 367
         >
368
+          {/*Tags */}
347 369
           {tagFilterOption.length > 0 && (
348 370
             <FormControl
349
-              sx={{ m: 1, display: "flex", flexDirection: "row" }}
371
+              sx={{ width: { xs: "33.3%", sm: "33.3%", md: "fit-content" } }}
350 372
               variant="standard"
351 373
             >
352
-              <Typography variant="body2" sx={{ mr: 1, my: "auto" }}>
353
-                Tag
354
-              </Typography>
355 374
               <Select
356 375
                 value={tags}
357 376
                 onChange={(event) => {
@@ -373,14 +392,12 @@ const ProductList = ({ size = 99999 }) => {
373 392
             </FormControl>
374 393
           )}
375 394
 
395
+          {/*Collection */}
376 396
           {collectionFilterOption.length > 0 && (
377 397
             <FormControl
378
-              sx={{ m: 1, display: "flex", flexDirection: "row" }}
398
+              sx={{ width: { xs: "33.3%", sm: "33.3%", md: "fit-content" } }}
379 399
               variant="standard"
380 400
             >
381
-              <Typography variant="body2" sx={{ mr: 1, my: "auto" }}>
382
-                Collection
383
-              </Typography>
384 401
               <Select
385 402
                 value={collection}
386 403
                 onChange={(event) => {
@@ -402,13 +419,11 @@ const ProductList = ({ size = 99999 }) => {
402 419
             </FormControl>
403 420
           )}
404 421
 
422
+          {/*Sort */}
405 423
           <FormControl
406
-            sx={{ m: 1, display: "flex", flexDirection: "row" }}
424
+            sx={{ width: { xs: "33.3%", sm: "33.3%", md: "fit-content" } }}
407 425
             variant="standard"
408 426
           >
409
-            <Typography variant="body2" sx={{ mr: 1, my: "auto" }}>
410
-              Sort
411
-            </Typography>
412 427
             <Select
413 428
               value={sort}
414 429
               onChange={(event) => {

Loading…
Cancel
Save