1
1
import { useTranslation } from "next-i18next"
2
- import {
3
- Drawer ,
4
- DrawerCloseButton ,
5
- DrawerContent ,
6
- DrawerOverlay ,
7
- Flex ,
8
- Heading ,
9
- Hide ,
10
- Stack ,
11
- Text ,
12
- } from "@chakra-ui/react"
13
2
14
3
import Card from "@/components/Card"
4
+ import { Flex , Stack , VStack } from "@/components/ui/flex"
5
+ import { Sheet , SheetClose , SheetContent } from "@/components/ui/sheet"
15
6
16
7
import { TriangleSVG , TriangleSVGProps } from "./Triangle"
17
8
import { useTrilemma } from "./useTrilemma"
@@ -33,50 +24,45 @@ const Trilemma = () => {
33
24
}
34
25
35
26
return (
36
- < Flex
37
- alignItems = "center"
38
- flexDirection = { { base : "column" , lg : "row" } }
39
- justifyContent = "space-between"
40
- columnGap = "12"
41
- rowGap = "8"
42
- >
43
- < Stack
44
- spacing = "8"
45
- mt = { { base : "16" , md : "20" } }
46
- mb = { { lg : "20" } }
47
- ms = { { md : "12" } }
48
- me = { { md : "12" , lg : 0 } }
49
- flex = { {
50
- lg : "0 1 500px" ,
51
- } }
52
- >
53
- < Heading fontSize = "2rem" >
54
- { t ( "page-roadmap-vision-trilemma-h2" ) }
55
- </ Heading >
56
- < Flex flexDir = "column" gap = "6" >
57
- < Text > { t ( "page-roadmap-vision-trilemma-p" ) } </ Text >
58
- < Text > { t ( "page-roadmap-vision-trilemma-p-1" ) } </ Text >
59
- < Text > { t ( "page-roadmap-vision-trilemma-p-2" ) } </ Text >
60
- < Text fontWeight = { 600 } hideFrom = "lg" >
27
+ < Flex className = "flex-col items-center justify-between space-y-8 lg:flex-row lg:space-x-12 lg:space-y-0" >
28
+ < Stack className = "mt-16 space-y-8 md:mx-12 md:mt-20 lg:mb-20 lg:mr-0 lg:flex-[0_1_500px]" >
29
+ < h2 > { t ( "page-roadmap-vision-trilemma-h2" ) } </ h2 >
30
+ < VStack className = "space-y-6" >
31
+ < p > { t ( "page-roadmap-vision-trilemma-p" ) } </ p >
32
+ < p > { t ( "page-roadmap-vision-trilemma-p-1" ) } </ p >
33
+ < p > { t ( "page-roadmap-vision-trilemma-p-2" ) } </ p >
34
+ < p className = "font-semibold lg:hidden" >
61
35
{ t ( "page-roadmap-vision-trilemma-modal-tip" ) } :
62
- </ Text >
63
- </ Flex >
36
+ </ p >
37
+ </ VStack >
64
38
< Card { ...cardDetail } minH = "300px" hideBelow = "lg" mt = "6" />
65
39
</ Stack >
66
- < Hide above = "lg" >
67
- < Drawer
68
- isOpen = { mobileModalOpen }
69
- onClose = { handleModalClose }
70
- placement = "bottom"
71
- >
72
- < DrawerOverlay background = "rgba(0,0,0,0.3)" />
73
- < DrawerContent borderTopRadius = "2xl" background = "background.base" >
74
- < Card { ...cardDetail } background = "none" border = "none" my = "8" />
75
- < DrawerCloseButton top = "6" insetInlineEnd = "6" />
76
- </ DrawerContent >
77
- </ Drawer >
78
- </ Hide >
79
- < TriangleSVG { ...triangleSVGProps } />
40
+ < Sheet open = { mobileModalOpen } onOpenChange = { handleModalClose } >
41
+ < SheetContent side = "bottom" className = "rounded-t-[16px]" >
42
+ < Card { ...cardDetail } background = "none" border = "none" my = "8" />
43
+ < SheetClose className = "absolute right-3 top-5" >
44
+ < span className = "sr-only" > Close</ span >
45
+ < svg
46
+ xmlns = "http://www.w3.org/2000/svg"
47
+ width = "20"
48
+ height = "20"
49
+ viewBox = "0 0 24 24"
50
+ fill = "none"
51
+ stroke = "currentColor"
52
+ strokeWidth = "2"
53
+ strokeLinecap = "round"
54
+ strokeLinejoin = "round"
55
+ >
56
+ < line x1 = "18" y1 = "6" x2 = "6" y2 = "18" > </ line >
57
+ < line x1 = "6" y1 = "6" x2 = "18" y2 = "18" > </ line >
58
+ </ svg >
59
+ </ SheetClose >
60
+ </ SheetContent >
61
+ </ Sheet >
62
+
63
+ < div >
64
+ < TriangleSVG { ...triangleSVGProps } />
65
+ </ div >
80
66
</ Flex >
81
67
)
82
68
}
0 commit comments