[tests] Use prop-types over React.PropTypes

This commit is contained in:
Elliot Hesp 2017-06-05 10:04:04 +01:00
parent c61bddeb43
commit f0dce1512b
5 changed files with 13 additions and 8 deletions

View File

@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import { StyleSheet, View, Text } from 'react-native';
function Banner({ type, children, style, textStyle }) {
@ -15,15 +16,15 @@ function Banner({ type, children, style, textStyle }) {
}
Banner.propTypes = {
type: React.PropTypes.oneOf([
type: PropTypes.oneOf([
'success',
'warning',
'error',
'info',
]),
children: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.array,
children: PropTypes.oneOfType([
PropTypes.string,
PropTypes.array,
]).isRequired,
style: View.propTypes.style,
textStyle: Text.propTypes.style,

View File

@ -1,4 +1,5 @@
import React, { PropTypes, Component } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import some from 'lodash.some';
import { connect } from 'react-redux';

View File

@ -1,5 +1,6 @@
import { View, Text } from 'react-native';
import React, { PropTypes, Component } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import RunStatus from '../../lib/RunStatus';
import Icon from './Icon';

View File

@ -1,4 +1,5 @@
import React, { PropTypes, Component } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Toast from 'react-native-simple-toast';

View File

@ -1,4 +1,5 @@
import React, { PropTypes, Component } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Toast from 'react-native-simple-toast';