Просмотр исходного кода

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

master
nadia 2 дней назад
Родитель
Сommit
43dce51ee4
1 измененных файлов: 85 добавлений и 57 удалений
  1. 85
    57
      src/components/ProductDetails/ProductDetails.jsx

+ 85
- 57
src/components/ProductDetails/ProductDetails.jsx Просмотреть файл

@@ -541,17 +541,19 @@ const ProductDetails = () => {
541 541
         </Alert>
542 542
       )}
543 543
 
544
+      {/* Atome Popup */}
544 545
       <Dialog
545 546
         open={atomeOpen}
546 547
         onClose={() => setAtomeOpen(false)}
547
-        maxWidth="md"
548
-        fullWidth
548
+        maxWidth={false}
549 549
         PaperProps={{
550 550
           sx: {
551 551
             borderRadius: 0,
552 552
             backgroundColor: "#FFF",
553
+            width: { xs: "calc(100% - 48px)", md: 860 },
554
+            maxWidth: { xs: 340, md: "calc(100% - 160px)" },
553 555
             px: { xs: 3, md: 8 },
554
-            py: { xs: 6, md: 7 },
556
+            py: { xs: 3.5, md: 7 },
555 557
             position: "relative"
556 558
           }
557 559
         }}
@@ -561,51 +563,43 @@ const ProductDetails = () => {
561 563
           onClick={() => setAtomeOpen(false)}
562 564
           sx={{
563 565
             position: "absolute",
564
-            right: 16,
565
-            top: 12,
566
+            right: { xs: 8, md: 16 },
567
+            top: { xs: 6, md: 12 },
566 568
             color: "#000"
567 569
           }}
568 570
         >
569
-          <CloseIcon sx={{ fontSize: 34 }} />
571
+          <CloseIcon sx={{ fontSize: { xs: 24, md: 34 } }} />
570 572
         </IconButton>
571 573
 
572 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 576
             <Typography
575 577
               component="span"
576 578
               sx={{
577
-                fontSize: { xs: "2.25rem", md: "3rem" },
579
+                fontSize: { xs: "2rem", md: "3rem" },
578 580
                 fontWeight: 700,
579 581
                 lineHeight: 1,
580 582
                 color: "#000"
581 583
               }}
582 584
             >
583
-              atome
585
+              Atome
584 586
             </Typography>
585 587
             <Box
586
-              component="span"
588
+              component="img"
589
+              src={atomeLogo}
590
+              alt="Atome"
587 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 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 600
             Time to own it
607 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 603
             Why wait? Shop today, 3 easy payments.
610 604
           </Typography>
611 605
 
@@ -613,8 +607,8 @@ const ProductDetails = () => {
613 607
             sx={{
614 608
               display: "grid",
615 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,53 +628,87 @@ const ProductDetails = () => {
634 628
                 text: "Vast variety"
635 629
               }
636 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 641
                 <Box
639 642
                   sx={{
640 643
                     color: "#111827",
641 644
                     "& svg": {
642
-                      fontSize: 72,
645
+                      fontSize: { xs: 42, md: 72 },
643 646
                       stroke: "#111827",
644 647
                       strokeWidth: 0.6
645 648
                     },
646
-                    mb: 3
649
+                    mb: { xs: 0, md: 3 },
650
+                    textAlign: "center"
647 651
                   }}
648 652
                 >
649 653
                   {item.icon}
650 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 663
               </Box>
658 664
             ))}
659 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 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 712
         </Box>
685 713
       </Dialog>
686 714
     </Box>

Загрузка…
Отмена
Сохранить