@@ -9,65 +9,67 @@ export default {
99
1010const Template = ( args ) => < BetterImage { ...args } /> ;
1111
12+ const imageStyle = { height : 200 , width : 400 } ;
13+
1214const validSource = ( ) => ( {
1315 source : {
14- uri : `https://pyt-images.imgix.net/images/app/pretrip/australia.png?h=346.5 &w=252&crop=fit&dpr=3&auto=format,compress,enhance&q=10 &bust=${ Math . random ( ) } ` ,
16+ uri : `https://unsplash.com/photos/yNvVnPcurD8/download?force=true &w=2400 &bust=${ Math . random ( ) } ` ,
1517 } ,
1618 thumbnailSource : {
17- uri : `https://pyt-images.imgix.net/images/app/pretrip/australia.png?h=346.5 &w=252&crop=fit&dpr=0.1&auto=format,compress,enhance&q=10 &bust=${ Math . random ( ) } ` ,
19+ uri : `https://unsplash.com/photos/yNvVnPcurD8/download?force=true &w=24 &bust=${ Math . random ( ) } ` ,
1820 } ,
1921 fallbackSource : {
20- uri : `https://pyt-images.imgix.net/images/place-holder .png?bust=${ Math . random ( ) } ` ,
22+ uri : `https://unsplash.com/a/img/empty-states/photos .png?bust=${ Math . random ( ) } ` ,
2123 } ,
2224} ) ;
2325export const ValidImage = Template . bind ( { } ) ;
2426ValidImage . args = {
2527 ...validSource ( ) ,
26- viewStyle : { height : 400 , width : 400 } ,
28+ viewStyle : imageStyle ,
2729 resizeMode : 'contain' ,
2830} ;
2931
3032const inValidSource = ( ) => ( {
3133 source : {
32- uri : `https://pyt-images.imgix.net/images/app/pretrip/nowheretobefound.png?h=346.5 &w=252&crop=fit&dpr=0.3&auto=format,compress,enhance&q=10 &bust=${ Math . random ( ) } ` ,
34+ uri : `https://unsplash.com/photos/2347729843y7/download?force=true &w=2400 &bust=${ Math . random ( ) } ` ,
3335 } ,
3436 thumbnailSource : {
35- uri : `https://pyt-images.imgix.net/images/app/pretrip/nowheretobefound.png?h=346.5 &w=252&crop=fit&dpr=0.1&auto=format,compress,enhance&q=10 &bust=${ Math . random ( ) } ` ,
37+ uri : `https://unsplash.com/photos/2347729843y7/download?force=true &w=24 &bust=${ Math . random ( ) } ` ,
3638 } ,
3739 fallbackSource : {
38- uri : `https://pyt-images.imgix.net/images/place-holder .png?bust=${ Math . random ( ) } ` ,
40+ uri : `https://unsplash.com/a/img/empty-states/photos .png?bust=${ Math . random ( ) } ` ,
3941 } ,
4042} ) ;
4143
4244export const InvalidImage = Template . bind ( { } ) ;
4345InvalidImage . args = {
4446 ...inValidSource ( ) ,
45- viewStyle : { height : 400 , width : 400 } ,
47+ viewStyle : imageStyle ,
4648 resizeMode : 'contain' ,
4749} ;
4850
4951const invalidImageOnlySource = ( ) => ( {
5052 source : {
51- uri : `https://pyt-images.imgix.net/images/app/pretrip/nowheretobefound.png?h=346.5 &w=252&crop=fit&dpr=0.3&auto=format,compress,enhance&q=10 &bust=${ Math . random ( ) } ` ,
53+ uri : `https://unsplash.com/photos/2347729843y7/download?force=true &w=2400 &bust=${ Math . random ( ) } ` ,
5254 } ,
5355 thumbnailSource : {
54- uri : `https://pyt-images.imgix.net/images/app/pretrip/australia.png?h=346.5 &w=252&crop=fit&dpr=0.1&auto=format,compress,enhance&q=10 &bust=${ Math . random ( ) } ` ,
56+ uri : `https://unsplash.com/photos/yNvVnPcurD8/download?force=true &w=24 &bust=${ Math . random ( ) } ` ,
5557 } ,
5658 fallbackSource : {
57- uri : `https://pyt-images.imgix.net/images/place-holder .png?bust=${ Math . random ( ) } ` ,
59+ uri : `https://unsplash.com/a/img/empty-states/photos .png?bust=${ Math . random ( ) } ` ,
5860 } ,
5961} ) ;
6062export const InvalidImageButWithValidThumbnail = Template . bind ( { } ) ;
6163InvalidImageButWithValidThumbnail . args = {
6264 ...invalidImageOnlySource ( ) ,
63- viewStyle : { height : 400 , width : 400 } ,
65+ viewStyle : imageStyle ,
6466 resizeMode : 'contain' ,
6567} ;
6668
6769export const CustomImageFadeDuration = Template . bind ( { } ) ;
6870CustomImageFadeDuration . args = {
6971 ...validSource ( ) ,
70- viewStyle : { height : 400 , width : 400 } ,
72+ viewStyle : imageStyle ,
7173 resizeMode : 'contain' ,
7274 thumbnailFadeDuration : 250 ,
7375 imageFadeDuration : 2000 ,
0 commit comments