From ed8aadf45c4394b71e71e2a3822e929e212663d7 Mon Sep 17 00:00:00 2001 From: Serhey-Oleynik Date: Tue, 22 Nov 2016 17:44:48 -0800 Subject: [PATCH] [fix] PropTypes production error See: https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types/issues/68 --- src/components/ScrollView/index.js | 1 - src/components/Touchable/TouchableHighlight.js | 2 +- src/components/Touchable/TouchableWithoutFeedback.js | 7 +++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/ScrollView/index.js b/src/components/ScrollView/index.js index 6e2e0e5d..49da0d88 100644 --- a/src/components/ScrollView/index.js +++ b/src/components/ScrollView/index.js @@ -21,7 +21,6 @@ import React, { Component, PropTypes } from 'react'; const ScrollView = React.createClass({ propTypes: { ...View.propTypes, - children: View.propTypes.children, contentContainerStyle: StyleSheetPropType(ViewStylePropTypes), horizontal: PropTypes.bool, keyboardDismissMode: PropTypes.oneOf([ 'none', 'interactive', 'on-drag' ]), diff --git a/src/components/Touchable/TouchableHighlight.js b/src/components/Touchable/TouchableHighlight.js index 3281f5c7..e8463d68 100644 --- a/src/components/Touchable/TouchableHighlight.js +++ b/src/components/Touchable/TouchableHighlight.js @@ -77,7 +77,7 @@ var TouchableHighlight = React.createClass({ * active. */ underlayColor: ColorPropType, - style: View.propTypes.style, + style: React.PropTypes.style, /** * Called immediately after the underlay is shown */ diff --git a/src/components/Touchable/TouchableWithoutFeedback.js b/src/components/Touchable/TouchableWithoutFeedback.js index e44ade1a..507e4d26 100644 --- a/src/components/Touchable/TouchableWithoutFeedback.js +++ b/src/components/Touchable/TouchableWithoutFeedback.js @@ -16,7 +16,6 @@ var EdgeInsetsPropType = require('../../propTypes/EdgeInsetsPropType'); var React = require('react'); var TimerMixin = require('react-timer-mixin'); var Touchable = require('./Touchable'); -var View = require('../View'); var ensurePositiveDelayProps = require('./ensurePositiveDelayProps'); var warning = require('fbjs/lib/warning'); var StyleSheet = require('../../apis/StyleSheet'); @@ -38,9 +37,9 @@ const TouchableWithoutFeedback = React.createClass({ mixins: [TimerMixin, Touchable.Mixin], propTypes: { - accessible: View.propTypes.accessible, - accessibilityLabel: View.propTypes.accessibilityLabel, - accessibilityRole: View.propTypes.accessibilityRole, + accessible: React.PropTypes.bool, + accessibilityLabel: React.PropTypes.string, + accessibilityRole: React.PropTypes.string, /** * If true, disable all interactions for this component. */