[fix] ignore native-only Image props

Close #788
This commit is contained in:
Maxime Thirouin
2018-01-24 12:00:04 +01:00
committed by Nicolas Gallagher
parent d04721c75a
commit 16d98b49f0

View File

@@ -108,7 +108,13 @@ class Image extends Component<*, State> {
onLoadStart: func,
resizeMode: oneOf(Object.keys(ImageResizeMode)),
source: ImageSourcePropType,
style: StyleSheetPropType(ImageStylePropTypes)
style: StyleSheetPropType(ImageStylePropTypes),
// compatibility with React Native
/* eslint-disable react/sort-prop-types */
blurRadius: number,
capInsets: shape({ top: number, left: number, bottom: number, right: number }),
resizeMethod: oneOf(['auto', 'resize', 'scale'])
/* eslint-enable react/sort-prop-types */
};
static defaultProps = {
@@ -184,10 +190,13 @@ class Image extends Component<*, State> {
source,
testID,
/* eslint-disable */
blurRadius,
capInsets,
onError,
onLoad,
onLoadEnd,
onLoadStart,
resizeMethod,
resizeMode,
/* eslint-enable */
...other