mirror of
https://github.com/status-im/react-native.git
synced 2025-01-13 11:05:21 +00:00
[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:
parent
33e62f71f4
commit
18e6094cab
@ -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
|
||||
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user