Skip to content

Commit

Permalink
Clean up imports and update KeyboardAvoidingView to @flow strict-local
Browse files Browse the repository at this point in the history
Summary:
Changelog:
[General][Changed] Clean up imports and update KeyboardAvoidingView to flow strict-local

Reviewed By: lunaleaps, nadiia

Differential Revision: D27720919

fbshipit-source-id: 9863c2de0ad34889dbde87c7d5ad9316bda24649
  • Loading branch information
kacieb authored and facebook-github-bot committed Apr 14, 2021
1 parent d9a86aa commit 328f4ee
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Libraries/Components/Keyboard/KeyboardAvoidingView.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
* @flow strict-local
*/

const Keyboard = require('./Keyboard');
const LayoutAnimation = require('../../LayoutAnimation/LayoutAnimation');
const Platform = require('../../Utilities/Platform');
const React = require('react');
const StyleSheet = require('../../StyleSheet/StyleSheet');
const View = require('../View/View');
import Keyboard from './Keyboard';
import LayoutAnimation from '../../LayoutAnimation/LayoutAnimation';
import Platform from '../../Utilities/Platform';
import * as React from 'react';
import StyleSheet from '../../StyleSheet/StyleSheet';
import View from '../View/View';

import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
import {type EventSubscription} from '../../vendor/emitter/EventEmitter';
Expand Down Expand Up @@ -67,7 +67,7 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
_frame: ?ViewLayout = null;
_keyboardEvent: ?KeyboardEvent = null;
_subscriptions: Array<EventSubscription> = [];
viewRef: {current: React.ElementRef<any> | null, ...};
viewRef: {current: React.ElementRef<typeof View> | null, ...};
_initialFrameHeight: number = 0;

constructor(props: Props) {
Expand Down Expand Up @@ -162,7 +162,7 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
style,
...props
} = this.props;
const bottomHeight = enabled ? this.state.bottom : 0;
const bottomHeight = enabled === true ? this.state.bottom : 0;
switch (behavior) {
case 'height':
let heightStyle;
Expand Down

0 comments on commit 328f4ee

Please sign in to comment.