mirror of
https://github.com/status-im/react-native.git
synced 2025-02-10 16:36:25 +00:00
Flow Type KeyboardAvoidingView
Reviewed By: yungsters Differential Revision: D7978494 fbshipit-source-id: e21b4910470d3dc3fd35027f2f975b6842baa6ab
This commit is contained in:
parent
97e572ea6d
commit
188b118b60
@ -24,7 +24,8 @@ const View = require('View');
|
|||||||
const ViewPropTypes = require('ViewPropTypes');
|
const ViewPropTypes = require('ViewPropTypes');
|
||||||
|
|
||||||
import type EmitterSubscription from 'EmitterSubscription';
|
import type EmitterSubscription from 'EmitterSubscription';
|
||||||
import type {ViewLayout, ViewLayoutEvent} from 'ViewPropTypes';
|
import type {ViewStyleProp} from 'StyleSheet';
|
||||||
|
import type {ViewProps, ViewLayout, ViewLayoutEvent} from 'ViewPropTypes';
|
||||||
|
|
||||||
type ScreenRect = {
|
type ScreenRect = {
|
||||||
screenX: number,
|
screenX: number,
|
||||||
@ -39,13 +40,21 @@ type KeyboardChangeEvent = {
|
|||||||
easing?: string,
|
easing?: string,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type Props = $ReadOnly<{|
|
||||||
|
...ViewProps,
|
||||||
|
behavior?: ?('height' | 'position' | 'padding'),
|
||||||
|
contentContainerStyle?: ?ViewStyleProp,
|
||||||
|
enabled?: ?boolean,
|
||||||
|
keyboardVerticalOffset?: ?number,
|
||||||
|
|}>;
|
||||||
|
|
||||||
const viewRef = 'VIEW';
|
const viewRef = 'VIEW';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a component to solve the common problem of views that need to move out of the way of the virtual keyboard.
|
* This is a component to solve the common problem of views that need to move out of the way of the virtual keyboard.
|
||||||
* It can automatically adjust either its height, position or bottom padding based on the position of the keyboard.
|
* It can automatically adjust either its height, position or bottom padding based on the position of the keyboard.
|
||||||
*/
|
*/
|
||||||
const KeyboardAvoidingView = createReactClass({
|
const KeyboardAvoidingView = ((createReactClass({
|
||||||
displayName: 'KeyboardAvoidingView',
|
displayName: 'KeyboardAvoidingView',
|
||||||
mixins: [TimerMixin],
|
mixins: [TimerMixin],
|
||||||
|
|
||||||
@ -229,6 +238,6 @@ const KeyboardAvoidingView = createReactClass({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
}): any): React.ComponentType<Props>);
|
||||||
|
|
||||||
module.exports = KeyboardAvoidingView;
|
module.exports = KeyboardAvoidingView;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user