Converting Libraries/Components to not use var

Reviewed By: sahrens

Differential Revision: D7117137

fbshipit-source-id: a55a04928a0073a17e0709e851aa8b11678042ba
This commit is contained in:
Eli White
2018-03-03 15:38:18 -08:00
committed by Facebook Github Bot
parent f7343576fc
commit 3152e93095
43 changed files with 471 additions and 471 deletions
@@ -8,28 +8,28 @@
*/
'use strict';
var ColorPropType = require('ColorPropType');
var NativeMethodsMixin = require('NativeMethodsMixin');
var Platform = require('Platform');
var React = require('React');
var PropTypes = require('prop-types');
var ReactNative = require('ReactNative');
var StatusBar = require('StatusBar');
var StyleSheet = require('StyleSheet');
var UIManager = require('UIManager');
var View = require('View');
var ViewPropTypes = require('ViewPropTypes');
const ColorPropType = require('ColorPropType');
const NativeMethodsMixin = require('NativeMethodsMixin');
const Platform = require('Platform');
const React = require('React');
const PropTypes = require('prop-types');
const ReactNative = require('ReactNative');
const StatusBar = require('StatusBar');
const StyleSheet = require('StyleSheet');
const UIManager = require('UIManager');
const View = require('View');
const ViewPropTypes = require('ViewPropTypes');
var DrawerConsts = UIManager.AndroidDrawerLayout.Constants;
const DrawerConsts = UIManager.AndroidDrawerLayout.Constants;
var createReactClass = require('create-react-class');
var dismissKeyboard = require('dismissKeyboard');
var requireNativeComponent = require('requireNativeComponent');
const createReactClass = require('create-react-class');
const dismissKeyboard = require('dismissKeyboard');
const requireNativeComponent = require('requireNativeComponent');
var RK_DRAWER_REF = 'drawerlayout';
var INNERVIEW_REF = 'innerView';
const RK_DRAWER_REF = 'drawerlayout';
const INNERVIEW_REF = 'innerView';
var DRAWER_STATES = [
const DRAWER_STATES = [
'Idle',
'Dragging',
'Settling',
@@ -66,7 +66,7 @@ var DRAWER_STATES = [
* },
* ```
*/
var DrawerLayoutAndroid = createReactClass({
const DrawerLayoutAndroid = createReactClass({
displayName: 'DrawerLayoutAndroid',
statics: {
positions: DrawerConsts.DrawerPosition,
@@ -169,8 +169,8 @@ var DrawerLayoutAndroid = createReactClass({
},
render: function() {
var drawStatusBar = Platform.Version >= 21 && this.props.statusBarBackgroundColor;
var drawerViewWrapper =
const drawStatusBar = Platform.Version >= 21 && this.props.statusBarBackgroundColor;
const drawerViewWrapper =
<View
style={[
styles.drawerSubview,
@@ -180,7 +180,7 @@ var DrawerLayoutAndroid = createReactClass({
{this.props.renderNavigationView()}
{drawStatusBar && <View style={styles.drawerStatusBar} />}
</View>;
var childrenWrapper =
const childrenWrapper =
<View ref={INNERVIEW_REF} style={styles.mainSubview} collapsable={false}>
{drawStatusBar &&
<StatusBar
@@ -282,7 +282,7 @@ var DrawerLayoutAndroid = createReactClass({
});
var styles = StyleSheet.create({
const styles = StyleSheet.create({
base: {
flex: 1,
elevation: 16,
@@ -313,6 +313,6 @@ var styles = StyleSheet.create({
});
// The View that contains both the actual drawer and the main view
var AndroidDrawerLayout = requireNativeComponent('AndroidDrawerLayout', DrawerLayoutAndroid);
const AndroidDrawerLayout = requireNativeComponent('AndroidDrawerLayout', DrawerLayoutAndroid);
module.exports = DrawerLayoutAndroid;