File tree Expand file tree Collapse file tree 2 files changed +12
-33
lines changed Expand file tree Collapse file tree 2 files changed +12
-33
lines changed Original file line number Diff line number Diff line change 1
1
import React from "react"
2
2
import {
3
- Modal as ChakraModal ,
4
- ModalCloseButton ,
5
- ModalContent ,
6
3
type ModalContentProps ,
7
- ModalOverlay ,
8
4
type ModalProps ,
9
5
UseDisclosureReturn ,
10
6
} from "@chakra-ui/react"
11
7
8
+ import Modal from "../Modal"
9
+
12
10
type SimulatorModalProps = ModalContentProps &
13
11
Pick < ModalProps , "size" > & {
14
12
isOpen : UseDisclosureReturn [ "isOpen" ]
@@ -24,39 +22,15 @@ export const SimulatorModal = ({
24
22
...restProps
25
23
} : SimulatorModalProps ) => {
26
24
return (
27
- < ChakraModal
25
+ < Modal
28
26
isOpen = { isOpen }
29
27
onClose = { onClose }
30
28
isCentered
31
29
size = "full"
32
30
scrollBehavior = "inside"
31
+ contentProps = { restProps }
33
32
>
34
- < ModalOverlay bgColor = "blackAlpha.700" />
35
-
36
- < ModalContent
37
- py = { 8 }
38
- px = { { base : 4 , sm : 8 } }
39
- shadow = "md"
40
- border = "1px"
41
- borderColor = "border"
42
- borderRadius = "md"
43
- overflowY = "auto"
44
- overflowX = "hidden"
45
- minH = "unset"
46
- h = "100%"
47
- maxH = { {
48
- base : "calc(100vh - 1rem)" ,
49
- md : "min(calc(100vh - 2rem), 792px)" ,
50
- } }
51
- maxW = { {
52
- base : "calc(100vw - 1rem)" ,
53
- md : "min(calc(100vw - 2rem), 1000px)" ,
54
- } }
55
- { ...restProps }
56
- >
57
- < ModalCloseButton />
58
- { children }
59
- </ ModalContent >
60
- </ ChakraModal >
33
+ { children }
34
+ </ Modal >
61
35
)
62
36
}
Original file line number Diff line number Diff line change @@ -242,7 +242,12 @@ const TutorialPage = ({
242
242
< Translation id = "page-developers-tutorials:page-tutorial-subtitle" />
243
243
</ Text >
244
244
245
- < Modal isOpen = { isModalOpen } setIsOpen = { setModalOpen } dir = { dir } >
245
+ < Modal
246
+ isOpen = { isModalOpen }
247
+ onClose = { ( ) => setModalOpen ( false ) }
248
+ size = "xl"
249
+ contentProps = { { dir } }
250
+ >
246
251
< Heading fontSize = "2rem" lineHeight = "1.4" mb = { 4 } >
247
252
< Translation id = "page-developers-tutorials:page-tutorial-submit-btn" />
248
253
</ Heading >
You can’t perform that action at this time.
0 commit comments