-
-
Notifications
You must be signed in to change notification settings - Fork 151
Expand file tree
/
Copy pathModal.res
More file actions
50 lines (42 loc) · 1.13 KB
/
Modal.res
File metadata and controls
50 lines (42 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
include NativeElement
type orientation = [
| #landscape
| #"landscape-left"
| #"landscape-right"
| #portrait
| #"portrait-upside-down"
]
type orientationChange = [#landscape | #portrait]
module OrientationChangeEvent = {
type payload = {orientation: orientationChange}
include Event.SyntheticEvent({
type _payload = payload
})
}
type orientationChangeEvent = OrientationChangeEvent.t
type animationType = [#none | #slide | #fade]
type presentationStyle = [
| #fullScreen
| #pageSheet
| #formSheet
| #overFullScreen
]
@react.component @module("react-native")
external make: (
~ref: ref=?,
// Modal props
~animationType: animationType=?,
~backdropColor: Color.t=?,
~hardwareAccelerated: bool=?,
~navigationBarTranslucent: bool=?,
~onDismiss: unit => unit=?,
~onOrientationChange: orientationChangeEvent => unit=?,
~onRequestClose: unit => unit=?,
~onShow: unit => unit=?,
~presentationStyle: presentationStyle=?,
~statusBarTranslucent: bool=?,
~supportedOrientations: array<orientation>=?,
~transparent: bool=?,
~visible: bool=?,
~children: React.element=?,
) => React.element = "Modal"