Add display names

This commit is contained in:
Nicolas Gallagher
2016-09-01 19:14:58 -07:00
parent 0aef117733
commit 55849cdd0d
7 changed files with 11 additions and 5 deletions

View File

@@ -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,

View File

@@ -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);

View File

@@ -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)
};
}

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -33,7 +33,7 @@ const eventHandlerNames = [
];
class View extends Component {
static displayName = 'View'
static displayName = 'View';
static propTypes = {
...BaseComponentPropTypes,