[fix] ignore unsupported style prop types

Fix #347
Close #371
This commit is contained in:
Nicolas Gallagher
2017-02-27 16:40:54 -08:00
parent 5dc692719f
commit 997653863f
3 changed files with 17 additions and 8 deletions
+3 -1
View File
@@ -60,7 +60,9 @@ const createReducer = (style, styleProps) => {
}
// ignore React Native styles
case 'elevation':
case 'resizeMode': {
case 'overlayColor':
case 'resizeMode':
case 'tintColor': {
break;
}
case 'flex': {
+10 -7
View File
@@ -6,7 +6,8 @@ import { PropTypes } from 'react';
import ShadowPropTypes from '../../propTypes/ShadowPropTypes';
import TransformPropTypes from '../../propTypes/TransformPropTypes';
const hiddenOrVisible = PropTypes.oneOf([ 'hidden', 'visible' ]);
const { number, oneOf, string } = PropTypes;
const hiddenOrVisible = oneOf([ 'hidden', 'visible' ]);
module.exports = {
...BorderPropTypes,
@@ -15,15 +16,17 @@ module.exports = {
...TransformPropTypes,
backfaceVisibility: hiddenOrVisible,
backgroundColor: ColorPropType,
resizeMode: PropTypes.oneOf(Object.keys(ImageResizeMode)),
/**
* @platform web
*/
boxShadow: PropTypes.string,
opacity: PropTypes.number,
opacity: number,
overflow: hiddenOrVisible,
resizeMode: oneOf(Object.keys(ImageResizeMode)),
/**
* @platform unsupported
*/
overlayColor: string,
tintColor: ColorPropType,
/**
* @platform web
*/
boxShadow: string,
visibility: hiddenOrVisible
};
@@ -21,6 +21,10 @@ module.exports = {
opacity: number,
overflow: autoOrHiddenOrVisible,
zIndex: number,
/**
* @platform unsupported
*/
elevation: number,
/*
* @platform web
*/