mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
Update Image docs and examples to the new asset system
Summary: After the release of 0.14, static images should be placed in the source code tree and then required as explained in the [Images guide] (https://facebook.github.io/react-native/docs/images.html). This pull request updates the image documentation and examples to the new asset system. UIExplorer tested on iOS and Android. Closes https://github.com/facebook/react-native/pull/4987 Reviewed By: svcscm Differential Revision: D2796276 Pulled By: bestander fb-gh-sync-id: 732ffa2f136391bb8a3e40a54b5b1ff5022c97f2
This commit is contained in:
committed by
facebook-github-bot-4
parent
04d14e5a2e
commit
b85a52a461
@@ -38,7 +38,7 @@ var resolveAssetSource = require('resolveAssetSource');
|
||||
* <View>
|
||||
* <Image
|
||||
* style={styles.icon}
|
||||
* source={require('image!myIcon')}
|
||||
* source={require('./myIcon.png')}
|
||||
* />
|
||||
* <Image
|
||||
* style={styles.logo}
|
||||
@@ -66,8 +66,8 @@ var Image = React.createClass({
|
||||
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 the name of a static image
|
||||
* resource (which should be wrapped in the `require('image!name')` function).
|
||||
* could be an http address, a local file path, or a static image
|
||||
* resource (which should be wrapped in the `require('./path/to/image.png')` function).
|
||||
*/
|
||||
source: PropTypes.oneOfType([
|
||||
PropTypes.shape({
|
||||
|
||||
Reference in New Issue
Block a user