Преглед на файлове

feat module 6, 7 : [UI] modifie atome diolog content, add redirect link, modified dialog view for web and mobile

master
nadia преди 2 дни
родител
ревизия
43dce51ee4
променени са 1 файла, в които са добавени 85 реда и са изтрити 57 реда
  1. 85
    57
      src/components/ProductDetails/ProductDetails.jsx

+ 85
- 57
src/components/ProductDetails/ProductDetails.jsx Целия файл

541
         </Alert>
541
         </Alert>
542
       )}
542
       )}
543
 
543
 
544
+      {/* Atome Popup */}
544
       <Dialog
545
       <Dialog
545
         open={atomeOpen}
546
         open={atomeOpen}
546
         onClose={() => setAtomeOpen(false)}
547
         onClose={() => setAtomeOpen(false)}
547
-        maxWidth="md"
548
-        fullWidth
548
+        maxWidth={false}
549
         PaperProps={{
549
         PaperProps={{
550
           sx: {
550
           sx: {
551
             borderRadius: 0,
551
             borderRadius: 0,
552
             backgroundColor: "#FFF",
552
             backgroundColor: "#FFF",
553
+            width: { xs: "calc(100% - 48px)", md: 860 },
554
+            maxWidth: { xs: 340, md: "calc(100% - 160px)" },
553
             px: { xs: 3, md: 8 },
555
             px: { xs: 3, md: 8 },
554
-            py: { xs: 6, md: 7 },
556
+            py: { xs: 3.5, md: 7 },
555
             position: "relative"
557
             position: "relative"
556
           }
558
           }
557
         }}
559
         }}
561
           onClick={() => setAtomeOpen(false)}
563
           onClick={() => setAtomeOpen(false)}
562
           sx={{
564
           sx={{
563
             position: "absolute",
565
             position: "absolute",
564
-            right: 16,
565
-            top: 12,
566
+            right: { xs: 8, md: 16 },
567
+            top: { xs: 6, md: 12 },
566
             color: "#000"
568
             color: "#000"
567
           }}
569
           }}
568
         >
570
         >
569
-          <CloseIcon sx={{ fontSize: 34 }} />
571
+          <CloseIcon sx={{ fontSize: { xs: 24, md: 34 } }} />
570
         </IconButton>
572
         </IconButton>
571
 
573
 
572
         <Box sx={{ textAlign: "center" }}>
574
         <Box sx={{ textAlign: "center" }}>
573
-          <Box sx={{ display: "inline-flex", alignItems: "center", gap: 1, mb: 4 }}>
575
+          <Box sx={{ display: "inline-flex", alignItems: "center", gap: 1, mb: { xs: 2, md: 4 } }}>
574
             <Typography
576
             <Typography
575
               component="span"
577
               component="span"
576
               sx={{
578
               sx={{
577
-                fontSize: { xs: "2.25rem", md: "3rem" },
579
+                fontSize: { xs: "2rem", md: "3rem" },
578
                 fontWeight: 700,
580
                 fontWeight: 700,
579
                 lineHeight: 1,
581
                 lineHeight: 1,
580
                 color: "#000"
582
                 color: "#000"
581
               }}
583
               }}
582
             >
584
             >
583
-              atome
585
+              Atome
584
             </Typography>
586
             </Typography>
585
             <Box
587
             <Box
586
-              component="span"
588
+              component="img"
589
+              src={atomeLogo}
590
+              alt="Atome"
587
               sx={{
591
               sx={{
588
-                display: "inline-flex",
589
-                alignItems: "center",
590
-                justifyContent: "center",
591
-                width: { xs: 42, md: 50 },
592
-                height: { xs: 42, md: 50 },
593
-                borderRadius: "9px",
594
-                backgroundColor: "#F0FF4F",
595
-                color: "#000",
596
-                fontWeight: 700,
597
-                fontSize: { xs: "2rem", md: "2.35rem" },
598
-                lineHeight: 1
592
+                width: { xs: 36, md: 50 },
593
+                height: { xs: 36, md: 50 },
594
+                objectFit: "contain"
599
               }}
595
               }}
600
-            >
601
-              A
602
-            </Box>
596
+            />
603
           </Box>
597
           </Box>
604
 
598
 
605
-          <Typography sx={{ fontSize: "1.35rem", fontWeight: 500, mb: 1 }}>
599
+          <Typography sx={{ fontSize: { xs: "1rem", md: "1.35rem" }, fontWeight: 700, mb: 1 }}>
606
             Time to own it
600
             Time to own it
607
           </Typography>
601
           </Typography>
608
-          <Typography sx={{ color: "#7D8799", fontSize: "1.1rem", mb: { xs: 6, md: 9 } }}>
602
+          <Typography sx={{ color: "#7D8799", fontSize: { xs: "0.8rem", md: "1.1rem" }, fontWeight: 600, mb: { xs: 4, md: 9 } }}>
609
             Why wait? Shop today, 3 easy payments.
603
             Why wait? Shop today, 3 easy payments.
610
           </Typography>
604
           </Typography>
611
 
605
 
613
             sx={{
607
             sx={{
614
               display: "grid",
608
               display: "grid",
615
               gridTemplateColumns: { xs: "1fr", md: "repeat(3, 1fr)" },
609
               gridTemplateColumns: { xs: "1fr", md: "repeat(3, 1fr)" },
616
-              gap: { xs: 5, md: 6 },
617
-              mb: { xs: 6, md: 9 }
610
+              gap: { xs: 2.5, md: 6 },
611
+              mb: { xs: 4, md: 9 }
618
             }}
612
             }}
619
           >
613
           >
620
             {[
614
             {[
634
                 text: "Vast variety"
628
                 text: "Vast variety"
635
               }
629
               }
636
             ].map((item) => (
630
             ].map((item) => (
637
-              <Box key={item.title} sx={{ textAlign: "center" }}>
631
+              <Box
632
+                key={item.title}
633
+                sx={{
634
+                  display: { xs: "grid", md: "block" },
635
+                  gridTemplateColumns: { xs: "60px 1fr", md: "none" },
636
+                  alignItems: "center",
637
+                  columnGap: 1.5,
638
+                  textAlign: { xs: "left", md: "center" }
639
+                }}
640
+              >
638
                 <Box
641
                 <Box
639
                   sx={{
642
                   sx={{
640
                     color: "#111827",
643
                     color: "#111827",
641
                     "& svg": {
644
                     "& svg": {
642
-                      fontSize: 72,
645
+                      fontSize: { xs: 42, md: 72 },
643
                       stroke: "#111827",
646
                       stroke: "#111827",
644
                       strokeWidth: 0.6
647
                       strokeWidth: 0.6
645
                     },
648
                     },
646
-                    mb: 3
649
+                    mb: { xs: 0, md: 3 },
650
+                    textAlign: "center"
647
                   }}
651
                   }}
648
                 >
652
                 >
649
                   {item.icon}
653
                   {item.icon}
650
                 </Box>
654
                 </Box>
651
-                <Typography sx={{ fontWeight: 700, fontSize: "1.05rem", mb: 1 }}>
652
-                  {item.title}
653
-                </Typography>
654
-                <Typography sx={{ color: "#7D8799", fontSize: "1rem" }}>
655
-                  {item.text}
656
-                </Typography>
655
+                <Box>
656
+                  <Typography sx={{ fontWeight: 700, fontSize: { xs: "0.875rem", md: "1.05rem" }, mb: { xs: 0.25, md: 1 } }}>
657
+                    {item.title}
658
+                  </Typography>
659
+                  <Typography sx={{ color: "#7D8799", fontSize: { xs: "0.8rem", md: "1rem" }, fontWeight: 600 }}>
660
+                    {item.text}
661
+                  </Typography>
662
+                </Box>
657
               </Box>
663
               </Box>
658
             ))}
664
             ))}
659
           </Box>
665
           </Box>
660
 
666
 
661
-          <Typography sx={{ fontWeight: 700, mb: 2 }}>
662
-            Terms & Conditions
663
-          </Typography>
664
-          <Button
665
-            component="a"
666
-            href="https://www.atome.sg/how-it-works"
667
-            target="_blank"
668
-            rel="noopener noreferrer"
669
-            variant="contained"
667
+          <Box
670
             sx={{
668
             sx={{
671
-              backgroundColor: "#F0FF4F",
672
-              color: "#071021",
673
-              minWidth: 260,
674
-              fontWeight: 700,
675
-              fontSize: "1.35rem",
676
-              textTransform: "none",
677
-              "&:hover": {
678
-                backgroundColor: "#E5F33F"
679
-              }
669
+              display: "flex",
670
+              flexDirection: "column",
671
+              alignItems: "center"
680
             }}
672
             }}
681
           >
673
           >
682
-            How it works
683
-          </Button>
674
+            <Typography
675
+              component="a"
676
+              href="https://www.atome.sg/en-sg/terms-of-service"
677
+              target="_blank"
678
+              rel="noopener noreferrer"
679
+              sx={{
680
+                display: "inline-block",
681
+                color: "inherit",
682
+                textDecoration: "none",
683
+                fontWeight: 700,
684
+                mb: 2,
685
+                fontSize: { xs: "0.85rem", md: "1rem" }
686
+              }}
687
+            >
688
+              Terms & Conditions
689
+            </Typography>
690
+            <Button
691
+              component="a"
692
+              href="https://www.atome.sg/how-it-works"
693
+              target="_blank"
694
+              rel="noopener noreferrer"
695
+              variant="contained"
696
+              sx={{
697
+                backgroundColor: "#F0FF4F",
698
+                color: "#071021",
699
+                minWidth: { xs: 220, md: 260 },
700
+                fontWeight: 700,
701
+                fontSize: { xs: "1.15rem", md: "1.35rem" },
702
+                textTransform: "none",
703
+                borderRadius: 0,
704
+                "&:hover": {
705
+                  backgroundColor: "#E5F33F"
706
+                }
707
+              }}
708
+            >
709
+              How it works
710
+            </Button>
711
+          </Box>
684
         </Box>
712
         </Box>
685
       </Dialog>
713
       </Dialog>
686
     </Box>
714
     </Box>

Loading…
Отказ
Запис