11import React from 'react'
2- import { StyleSheet , View } from 'react-native'
2+ import { StyleSheet , View , Text } from 'react-native'
33import withCacheBust from './withCacheBust'
44import SectionFlex from './SectionFlex'
55import FastImage from 'react-native-fast-image'
@@ -8,32 +8,46 @@ import FeatureText from './FeatureText'
88
99const IMAGE_URL = 'https://media.giphy.com/media/GEsoqZDGVoisw/giphy.gif'
1010
11+ const Label = ( { children } ) => < Text style = { styles . text } > { children } </ Text >
12+
1113const BorderRadiusExample = ( { onPressReload, bust } ) => (
1214 < View >
1315 < Section >
1416 < FeatureText text = "• resizeMode." />
1517 </ Section >
1618 < SectionFlex onPress = { onPressReload } >
17- < FastImage
18- style = { styles . image }
19- resizeMode = { FastImage . resizeMode . contain }
20- source = { { uri : IMAGE_URL } }
21- />
22- < FastImage
23- style = { styles . image }
24- resizeMode = { FastImage . resizeMode . center }
25- source = { { uri : IMAGE_URL } }
26- />
27- < FastImage
28- style = { styles . image }
29- resizeMode = { FastImage . resizeMode . stretch }
30- source = { { uri : IMAGE_URL } }
31- />
32- < FastImage
33- style = { styles . image }
34- resizeMode = { FastImage . resizeMode . cover }
35- source = { { uri : IMAGE_URL } }
36- />
19+ < View >
20+ < FastImage
21+ style = { styles . image }
22+ resizeMode = { FastImage . resizeMode . contain }
23+ source = { { uri : IMAGE_URL } }
24+ />
25+ < Label > contain</ Label >
26+ </ View >
27+ < View >
28+ < FastImage
29+ style = { styles . image }
30+ resizeMode = { FastImage . resizeMode . center }
31+ source = { { uri : IMAGE_URL } }
32+ />
33+ < Label > center</ Label >
34+ </ View >
35+ < View >
36+ < FastImage
37+ style = { styles . image }
38+ resizeMode = { FastImage . resizeMode . stretch }
39+ source = { { uri : IMAGE_URL } }
40+ />
41+ < Label > stretch</ Label >
42+ </ View >
43+ < View >
44+ < FastImage
45+ style = { styles . image }
46+ resizeMode = { FastImage . resizeMode . cover }
47+ source = { { uri : IMAGE_URL } }
48+ />
49+ < Label > cover</ Label >
50+ </ View >
3751 </ SectionFlex >
3852 </ View >
3953)
@@ -43,9 +57,14 @@ const styles = StyleSheet.create({
4357 height : 100 ,
4458 width : 50 ,
4559 backgroundColor : '#ddd' ,
46- margin : 5 ,
60+ margin : 20 ,
61+ marginBottom : 10 ,
4762 flex : 0 ,
4863 } ,
64+ text : {
65+ textAlign : 'center' ,
66+ marginBottom : 20 ,
67+ } ,
4968} )
5069
5170export default withCacheBust ( BorderRadiusExample )
0 commit comments