Skip to content

Commit cb2eeb4

Browse files
brentvatnefacebook-github-bot-7
authored andcommitted
Add defaultSource example
Summary: Closes #5074 Reviewed By: svcscm Differential Revision: D2798023 Pulled By: nicklockwood fb-gh-sync-id: d8aa87bf8dcbecf53b341d5914bbe3354cc753aa
1 parent 80a2f5d commit cb2eeb4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Examples/UIExplorer/ImageExample.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,20 @@ exports.examples = [
187187
},
188188
platform: 'ios',
189189
},
190+
{
191+
title: 'defaultSource',
192+
description: 'Show a placeholder image when a network image is loading',
193+
render: function() {
194+
return (
195+
<Image
196+
defaultSource={require('./bunny.png')}
197+
source={{uri: 'http://facebook.github.io/origami/public/images/birds.jpg'}}
198+
style={styles.base}
199+
/>
200+
);
201+
},
202+
platform: 'ios',
203+
},
190204
{
191205
title: 'Border Color',
192206
render: function() {

0 commit comments

Comments
 (0)