mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 04:35:36 +08:00
Support tintColor for managed image assets
Reviewed By: @nicklockwood Differential Revision: D2443089
This commit is contained in:
committed by
facebook-github-bot-7
parent
dc7681e946
commit
390649ab4e
@@ -170,6 +170,12 @@ var Image = React.createClass({
|
|||||||
var resizeMode = this.props.resizeMode || (style || {}).resizeMode || 'cover'; // Workaround for flow bug t7737108
|
var resizeMode = this.props.resizeMode || (style || {}).resizeMode || 'cover'; // Workaround for flow bug t7737108
|
||||||
var tintColor = (style || {}).tintColor; // Workaround for flow bug t7737108
|
var tintColor = (style || {}).tintColor; // Workaround for flow bug t7737108
|
||||||
|
|
||||||
|
// This is a workaround for #8243665. RCTNetworkImageView does not support tintColor
|
||||||
|
// TODO: Remove this hack once we have one image implementation #8389274
|
||||||
|
if (isNetwork && tintColor) {
|
||||||
|
RawImage = RCTImageView;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RawImage
|
<RawImage
|
||||||
{...this.props}
|
{...this.props}
|
||||||
|
|||||||
Reference in New Issue
Block a user