-
-
Notifications
You must be signed in to change notification settings - Fork 151
Expand file tree
/
Copy pathKeyboard.res
More file actions
34 lines (28 loc) · 818 Bytes
/
Keyboard.res
File metadata and controls
34 lines (28 loc) · 818 Bytes
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
type screenRect = {
screenX: float,
screenY: float,
width: float,
height: float,
}
type eventType = [
| #keyboardWillShow
| #keyboardDidShow
| #keyboardWillHide
| #keyboardDidHide
| #keyboardWillChangeFrame
| #keyboardDidChangeFrame
]
type keyboardEvent = {
duration: float,
easing: LayoutAnimation.animationType,
endCoordinates: screenRect,
startCoordinates: screenRect,
isEventFromThisApp: bool,
}
type listener = keyboardEvent => unit
@module("react-native") @scope("Keyboard")
external addListener: (eventType, listener) => EventSubscription.t = "addListener"
@module("react-native") @scope("Keyboard")
external removeListener: (eventType, listener) => EventSubscription.t = "removeListener"
@module("react-native") @scope("Keyboard")
external dismiss: unit => unit = "dismiss"