Fix website Image examples

Remove use of 'resizeMode' static, which is no longer supported.
This commit is contained in:
Nicolas Gallagher
2019-03-14 14:20:25 -07:00
parent 763e2d4001
commit 8d1f5afead
@@ -14,35 +14,23 @@ const ImageResizeModeExample = () => (
<View style={styles.horizontal}> <View style={styles.horizontal}>
<View> <View>
<Text style={[styles.resizeModeText]}>Contain</Text> <Text style={[styles.resizeModeText]}>Contain</Text>
<Image <Image resizeMode="contain" source={source} style={styles.resizeMode} />
resizeMode={Image.resizeMode.contain}
source={source}
style={styles.resizeMode}
/>
</View> </View>
<View> <View>
<Text style={[styles.resizeModeText]}>Cover</Text> <Text style={[styles.resizeModeText]}>Cover</Text>
<Image <Image resizeMode="cover" source={source} style={styles.resizeMode} />
resizeMode={Image.resizeMode.cover}
source={source}
style={styles.resizeMode}
/>
</View> </View>
<View> <View>
<Text style={[styles.resizeModeText]}>Stretch</Text> <Text style={[styles.resizeModeText]}>Stretch</Text>
<Image <Image resizeMode="stretch" source={source} style={styles.resizeMode} />
resizeMode={Image.resizeMode.stretch}
source={source}
style={styles.resizeMode}
/>
</View> </View>
<View> <View>
<Text style={[styles.resizeModeText]}>Repeat</Text> <Text style={[styles.resizeModeText]}>Repeat</Text>
<Image resizeMode={'repeat'} source={source} style={styles.resizeMode} /> <Image resizeMode="repeat" source={source} style={styles.resizeMode} />
</View> </View>
<View> <View>
<Text style={[styles.resizeModeText]}>Center</Text> <Text style={[styles.resizeModeText]}>Center</Text>
<Image resizeMode={'center'} source={source} style={styles.resizeMode} /> <Image resizeMode="center" source={source} style={styles.resizeMode} />
</View> </View>
</View> </View>
</View> </View>