From 55849cdd0d5f96103cd82aad179c5d7c624fded3 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Thu, 1 Sep 2016 19:14:58 -0700 Subject: [PATCH] Add display names --- src/components/ActivityIndicator/index.js | 2 ++ src/components/Image/index.js | 3 +-- src/components/ProgressBar/index.js | 3 ++- src/components/Switch/index.js | 2 ++ src/components/Text/index.js | 2 +- src/components/TextInput/index.js | 2 ++ src/components/View/index.js | 2 +- 7 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/components/ActivityIndicator/index.js b/src/components/ActivityIndicator/index.js index b9453cf9..74777948 100644 --- a/src/components/ActivityIndicator/index.js +++ b/src/components/ActivityIndicator/index.js @@ -8,6 +8,8 @@ import React, { Component, PropTypes } from 'react'; const rotationInterpolation = { inputRange: [ 0, 1 ], outputRange: [ '0deg', '360deg' ] }; class ActivityIndicator extends Component { + static displayName = 'ActivityIndicator'; + static propTypes = { ...View.propTypes, animating: PropTypes.bool, diff --git a/src/components/Image/index.js b/src/components/Image/index.js index 689b2272..ff2d0776 100644 --- a/src/components/Image/index.js +++ b/src/components/Image/index.js @@ -24,7 +24,7 @@ const ImageSourcePropType = PropTypes.oneOfType([ ]); class Image extends Component { - static displayName = 'Image' + static displayName = 'Image'; static propTypes = { ...BaseComponentPropTypes, @@ -234,4 +234,3 @@ const resizeModeStyles = StyleSheet.create({ }); module.exports = applyNativeMethods(Image); - diff --git a/src/components/ProgressBar/index.js b/src/components/ProgressBar/index.js index 3a5c81e2..37a7ebad 100644 --- a/src/components/ProgressBar/index.js +++ b/src/components/ProgressBar/index.js @@ -9,6 +9,8 @@ const indeterminateWidth = '25%'; const translateInterpolation = { inputRange: [ 0, 1 ], outputRange: [ '-100%', '400%' ] }; class ProgressBar extends Component { + static displayName = 'ProgressBar'; + static propTypes = { ...View.propTypes, color: ColorPropType, @@ -27,7 +29,6 @@ class ProgressBar extends Component { constructor(props) { super(props); this.state = { - animationScale: new Animated.Value(0), animationTranslate: new Animated.Value(0) }; } diff --git a/src/components/Switch/index.js b/src/components/Switch/index.js index 29228aaa..1a5593f7 100644 --- a/src/components/Switch/index.js +++ b/src/components/Switch/index.js @@ -11,6 +11,8 @@ const thumbDefaultBoxShadow = '0px 1px 3px rgba(0,0,0,0.5)'; const thumbFocusedBoxShadow = `${thumbDefaultBoxShadow}, 0 0 0 10px rgba(0,0,0,0.1)`; class Switch extends Component { + static displayName = 'Switch'; + static propTypes = { ...View.propTypes, activeThumbColor: ColorPropType, diff --git a/src/components/Text/index.js b/src/components/Text/index.js index 3662f1f5..1e9d3b0f 100644 --- a/src/components/Text/index.js +++ b/src/components/Text/index.js @@ -8,7 +8,7 @@ import TextStylePropTypes from './TextStylePropTypes'; import { Component, PropTypes } from 'react'; class Text extends Component { - static displayName = 'Text' + static displayName = 'Text'; static propTypes = { ...BaseComponentPropTypes, diff --git a/src/components/TextInput/index.js b/src/components/TextInput/index.js index e241030d..744da0a0 100644 --- a/src/components/TextInput/index.js +++ b/src/components/TextInput/index.js @@ -15,6 +15,8 @@ import React, { Component, PropTypes } from 'react'; const viewStyleProps = Object.keys(ViewStylePropTypes); class TextInput extends Component { + static displayName = 'TextInput'; + static propTypes = { ...View.propTypes, autoComplete: PropTypes.bool, diff --git a/src/components/View/index.js b/src/components/View/index.js index cd69fc37..45bc9ab1 100644 --- a/src/components/View/index.js +++ b/src/components/View/index.js @@ -33,7 +33,7 @@ const eventHandlerNames = [ ]; class View extends Component { - static displayName = 'View' + static displayName = 'View'; static propTypes = { ...BaseComponentPropTypes,