Remove isRequired on source prop for Android
Summary: Makes source required across both platforms. Closes https://github.com/facebook/react-native/pull/5845 Reviewed By: svcscm Differential Revision: D2920250 Pulled By: vjeux fb-gh-sync-id: 21845b601df32dc2e12a95544afa3db4c0414746 shipit-source-id: 21845b601df32dc2e12a95544afa3db4c0414746
This commit is contained in:
parent
272096ce7c
commit
a11f980a34
|
@ -63,7 +63,7 @@ var ImageViewAttributes = merge(ReactNativeViewAttributes.UIView, {
|
|||
var Image = React.createClass({
|
||||
propTypes: {
|
||||
...View.propTypes,
|
||||
style: StyleSheetPropType(ImageStylePropTypes),
|
||||
style: StyleSheetPropType(ImageStylePropTypes),
|
||||
/**
|
||||
* `uri` is a string representing the resource identifier for the image, which
|
||||
* could be an http address, a local file path, or a static image
|
||||
|
@ -75,7 +75,7 @@ var Image = React.createClass({
|
|||
}),
|
||||
// Opaque type returned by require('./image.jpg')
|
||||
PropTypes.number,
|
||||
]).isRequired,
|
||||
]),
|
||||
/**
|
||||
* similarly to `source`, this property represents the resource used to render
|
||||
* the loading indicator for the image, displayed until image is ready to be
|
||||
|
|
|
@ -213,7 +213,7 @@ var Image = React.createClass({
|
|||
if (this.context.isInAParentText) {
|
||||
RawImage = RCTVirtualImage;
|
||||
if (!width || !height) {
|
||||
console.warn('You must specify a width and height for the image %s', uri);
|
||||
console.warn('You must specify a width and height for the image %s', uri);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue