Skip to content

Commit cfbc9c1

Browse files
committed
Move docs to correct location
1 parent fdef298 commit cfbc9c1

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed
Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
import PropTypes from 'prop-types';
21
import React from 'react';
32
import {StyleSheet, Dimensions} from 'react-native';
43
import KeyboardTrackingView from './KeyboardTrackingView';
54

6-
/**
7-
* @description: A UI component that enables “keyboard tracking" for this view and it's sub-views.
8-
* Would typically be used when you have a TextField or TextInput inside this view.
9-
*
10-
* @example: https://github.com/wix-private/wix-react-native-ui-lib/blob/master/example/screens/nativeComponentScreens/KeyboardTrackingViewScreen.js
11-
* @notes: This view is useful only for iOS.
12-
*/
135
const KeyboardAwareInsetsView = props => (
146
<KeyboardTrackingView {...props} pointerEvents={'none'} style={styles.insetsView} scrollToFocusedInput/>
157
);
@@ -26,19 +18,4 @@ const styles = StyleSheet.create({
2618
}
2719
});
2820

29-
KeyboardTrackingView.propTypes = {
30-
/**
31-
* Enables tracking of the keyboard when it's dismissed interactively (false by default).
32-
* Why? When using an external keyboard (BT),
33-
* you still get the keyboard events and the view just hovers when you focus the input.
34-
* Also, if you're not using interactive style of dismissing the keyboard
35-
* (or if you don't have an input inside this view) it doesn't make sense to track it anyway.
36-
* (This is caused because of the usage of inputAccessory to be able to track the
37-
* keyboard interactive change and it introduces this bug)
38-
*/
39-
trackInteractive: PropTypes.bool
40-
};
41-
42-
KeyboardTrackingView.displayName = 'KeyboardTrackingView';
43-
4421
export default KeyboardAwareInsetsView;

lib/components/Keyboard/KeyboardTracking/KeyboardTrackingView.ios.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,36 @@
22
* Created by artald on 15/05/2016.
33
*/
44

5+
import PropTypes from 'prop-types';
56
import React, {PureComponent} from 'react';
67
import ReactNative, {requireNativeComponent, NativeModules} from 'react-native';
78

89
const NativeKeyboardTrackingView = requireNativeComponent('KeyboardTrackingView', null);
910
const KeyboardTrackingViewManager = NativeModules.KeyboardTrackingViewManager;
1011

12+
/**
13+
* @description: A UI component that enables “keyboard tracking" for this view and it's sub-views.
14+
* Would typically be used when you have a TextField or TextInput inside this view.
15+
*
16+
* @example: https://github.com/wix-private/wix-react-native-ui-lib/blob/master/example/screens/nativeComponentScreens/KeyboardTrackingViewScreen.js
17+
* @notes: This view is useful only for iOS.
18+
*/
1119
class KeyboardTrackingView extends PureComponent {
20+
static displayName = 'KeyboardTrackingView';
21+
22+
static propTypes = {
23+
/**
24+
* Enables tracking of the keyboard when it's dismissed interactively (false by default).
25+
* Why? When using an external keyboard (BT),
26+
* you still get the keyboard events and the view just hovers when you focus the input.
27+
* Also, if you're not using interactive style of dismissing the keyboard
28+
* (or if you don't have an input inside this view) it doesn't make sense to track it anyway.
29+
* (This is caused because of the usage of inputAccessory to be able to track the
30+
* keyboard interactive change and it introduces this bug)
31+
*/
32+
trackInteractive: PropTypes.bool
33+
};
34+
1235
render() {
1336
return <NativeKeyboardTrackingView {...this.props} ref={r => (this.ref = r)}/>;
1437
}

0 commit comments

Comments
 (0)