Support bundle argument for image loading

Reviewed By: mmmulani

Differential Revision: D3768798

fbshipit-source-id: 5b35f06957cebfe74aca90fe6a456f7f739509a9
This commit is contained in:
Pieter De Baets
2016-08-31 17:30:50 -07:00
committed by Facebook Github Bot 3
parent 74308209f9
commit 46b54fd7a8
14 changed files with 286 additions and 7 deletions

View File

@@ -613,11 +613,39 @@ exports.examples = [
return (
<Image
source={require('image!LegacyImage')}
style={styles.base}
/>
);
},
},
{
title: 'Bundled images',
description:
'Images shipped in a separate native bundle',
render: function() {
return (
<View style={{flexDirection: 'row'}}>
<Image
source={{
url: 'ImageInBundle',
bundle: 'UIExplorerBundle',
width: 100,
height: 100,
}}
style={{borderColor: 'yellow', borderWidth: 4}}
/>
<Image
source={{
url: 'ImageInAssetCatalog',
bundle: 'UIExplorerBundle',
width: 100,
height: 100,
}}
style={{marginLeft: 10, borderColor: 'blue', borderWidth: 4}}
/>
</View>
);
},
},
];
var fullImage = {uri: 'http://facebook.github.io/react/img/logo_og.png'};