use new ViewPropTypes

This commit is contained in:
m.parzinski 2017-05-23 15:42:38 +02:00
parent df8ce9569d
commit 753fb41d2d
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
// @flow // @flow
import React, { Component, PropTypes } from 'react'; import React, { Component, PropTypes } from 'react';
import { processColor, requireNativeComponent, PointPropType, StyleSheet, View } from 'react-native'; import { processColor, requireNativeComponent, PointPropType, StyleSheet, View, ViewPropTypes } from 'react-native';
const deprecatedPropType = require('react-native/Libraries/Utilities/deprecatedPropType.js'); const deprecatedPropType = require('react-native/Libraries/Utilities/deprecatedPropType.js');
const convertPoint = (name, point) => { const convertPoint = (name, point) => {
@ -42,7 +42,7 @@ export default class LinearGradient extends Component {
]), ]),
colors: PropTypes.arrayOf(PropTypes.string).isRequired, colors: PropTypes.arrayOf(PropTypes.string).isRequired,
locations: PropTypes.arrayOf(PropTypes.number), locations: PropTypes.arrayOf(PropTypes.number),
...View.propTypes, ...ViewPropTypes,
}; };
props: PropsType; props: PropsType;
gradientRef: any; gradientRef: any;

View File

@ -3,7 +3,7 @@
* @flow * @flow
*/ */
import React, { Component, PropTypes } from 'react'; import React, { Component, PropTypes } from 'react';
import { processColor, requireNativeComponent, PointPropType, View } from 'react-native'; import { processColor, requireNativeComponent, PointPropType, View, ViewPropTypes } from 'react-native';
const deprecatedPropType = require('react-native/Libraries/Utilities/deprecatedPropType.js'); const deprecatedPropType = require('react-native/Libraries/Utilities/deprecatedPropType.js');
const convertPoint = (name, point) => { const convertPoint = (name, point) => {
@ -46,7 +46,7 @@ export default class LinearGradient extends Component {
]), ]),
colors: PropTypes.arrayOf(PropTypes.string).isRequired, colors: PropTypes.arrayOf(PropTypes.string).isRequired,
locations: PropTypes.arrayOf(PropTypes.number), locations: PropTypes.arrayOf(PropTypes.number),
...View.propTypes, ...ViewPropTypes,
}; };
props: PropsType; props: PropsType;
gradientRef: any; gradientRef: any;