1+ // Type definitions for react-native-keyboard-aware-scroll-view
2+ // Project: https://github.com/APSL/react-native-keyboard-aware-scroll-view
3+ // Definitions by: Kyle Roach <https://github.com/iRoachie>
4+ // TypeScript Version: 2.3.2
5+
6+ import React from 'react'
7+ import { ScrollViewProperties , ListViewProperties } from 'react-native'
8+
9+ interface KeyboardAwareProps {
10+ /**
11+ * Adds an extra offset that represents the TabBarIOS height.
12+ *
13+ * @type {boolean }
14+ * @memberof KeyboardAwareProps
15+ */
16+ viewIsInsideTabBar ?: boolean
17+
18+ /**
19+ * Coordinates that will be used to reset the scroll when the keyboard hides.
20+ *
21+ * @type {{
22+ * x: number,
23+ * y: number
24+ * }}
25+ * @memberof KeyboardAwareProps
26+ */
27+ resetScrollToCoords ?: {
28+ x : number ,
29+ y : number
30+ }
31+
32+ /**
33+ * Lets the user enable or disable automatic resetScrollToCoords
34+ *
35+ * @type {boolean }
36+ * @memberof KeyboardAwareProps
37+ */
38+ enableResetScrollToCoords ?: boolean
39+
40+ /**
41+ * When focus in TextInput will scroll the position
42+ *
43+ * Default is true
44+ *
45+ * @type {boolean }
46+ * @memberof KeyboardAwareProps
47+ */
48+ enableAutoAutomaticScroll ?: boolean
49+
50+ /**
51+ * Adds an extra offset when focusing the TextInputs.
52+ *
53+ * Default is 75
54+ * @type {number }
55+ * @memberof KeyboardAwareProps
56+ */
57+ extraHeight ?: number
58+
59+ /**
60+ * Adds an extra offset to the keyboard.
61+ * Useful if you want to stick elements above the keyboard.
62+ *
63+ * Default is 0
64+ *
65+ * @type {number }
66+ * @memberof KeyboardAwareProps
67+ */
68+ extraScrollHeight ?: number
69+ }
70+
71+ interface KeyboardAwareListViewProps extends KeyboardAwareProps , ListViewProperties { }
72+ interface KeyboardAwareScrollViewProps extends KeyboardAwareProps , ScrollViewProperties { }
73+
74+ export class KeyboardAwareMixin { }
75+ export class KeyboardAwareListView extends React . Component < KeyboardAwareListViewProps , null > { }
76+ export class KeyboardAwareScrollView extends React . Component < KeyboardAwareScrollViewProps , null > { }
0 commit comments