mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 11:34:23 +00:00
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({
|
var Image = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
...View.propTypes,
|
...View.propTypes,
|
||||||
style: StyleSheetPropType(ImageStylePropTypes),
|
style: StyleSheetPropType(ImageStylePropTypes),
|
||||||
/**
|
/**
|
||||||
* `uri` is a string representing the resource identifier for the image, which
|
* `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
|
* 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')
|
// Opaque type returned by require('./image.jpg')
|
||||||
PropTypes.number,
|
PropTypes.number,
|
||||||
]).isRequired,
|
]),
|
||||||
/**
|
/**
|
||||||
* similarly to `source`, this property represents the resource used to render
|
* similarly to `source`, this property represents the resource used to render
|
||||||
* the loading indicator for the image, displayed until image is ready to be
|
* 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) {
|
if (this.context.isInAParentText) {
|
||||||
RawImage = RCTVirtualImage;
|
RawImage = RCTVirtualImage;
|
||||||
if (!width || !height) {
|
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…
x
Reference in New Issue
Block a user