[ReactNative] Add overflow to the whitelisted Image props

Summary:
For some reason we're now spamming the logs everytime we render an Image because overflow is not defined in the whitelist. overflow: 'hidden' is needed for network images with cover mode.

The way we currently define those is not optimal where we try to factor as many things as possible into distinct propTypes. However for Text we're not even using this but we are getting all the ones from View (which many do not apply) and remove some that aren't needed.

It may be useful to cleanup this in the future but in the short term, it's better to remove this warning that doesn't have much value anyway.
This commit is contained in:
Christopher Chedeau 2015-07-27 10:49:43 -07:00
parent 33e62f71f4
commit 18e6094cab
2 changed files with 1 additions and 5 deletions

View File

@ -24,6 +24,7 @@ var ImageStylePropTypes = {
borderColor: ReactPropTypes.string,
borderWidth: ReactPropTypes.number,
borderRadius: ReactPropTypes.number,
overflow: ReactPropTypes.oneOf(['visible', 'hidden']),
// iOS-Specific style to "tint" an image.
// It changes the color of all the non-transparent pixels to the tintColor

View File

@ -51,11 +51,6 @@ class StyleSheetValidation {
static addValidStylePropTypes(stylePropTypes) {
for (var key in stylePropTypes) {
invariant(
allStylePropTypes[key] === undefined ||
allStylePropTypes[key] === stylePropTypes[key],
'Attemped to redefine existing style prop type "' + key + '".'
);
allStylePropTypes[key] = stylePropTypes[key];
}
}