UNPKG

crn-cli

Version:

The Ctrip React Native CLI Tools

1 lines 1.45 kB
__d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),l=r(d[1]),o=r(d[2]),n=r(d[3]),c=r(d[4]),s=r(d[5]),h=r(d[6]),u=h.Image,b=h.StyleSheet,y=h.View,p=h.ScrollView,w=(function(h){function b(){var l,c;t(this,b);for(var s=arguments.length,h=new Array(s),u=0;u<s;u++)h[u]=arguments[u];return(c=o(this,(l=n(b)).call.apply(l,[this].concat(h)))).state={asset:c.props.asset},c}return c(b,h),l(b,[{key:"render",value:function(){var t=this.state.asset.node.image;return s.createElement(p,null,s.createElement(y,{style:E.row},s.createElement(u,{source:t,style:E.imageWide})),s.createElement(y,{style:E.row},s.createElement(u,{source:t,style:E.imageThumb}),s.createElement(u,{source:t,style:E.imageThumb}),s.createElement(u,{source:t,style:E.imageThumb})),s.createElement(y,{style:E.row},s.createElement(u,{source:t,style:E.imageT1}),s.createElement(u,{source:t,style:E.imageT2})))}}]),b})(s.Component),E=b.create({row:{padding:5,flex:1,flexDirection:'row',alignSelf:'center'},imageWide:{borderWidth:1,borderColor:'black',width:320,height:240,margin:5},imageThumb:{borderWidth:1,borderColor:'black',width:100,height:100,margin:5},imageT1:{borderWidth:1,borderColor:'black',width:212,height:320,margin:5},imageT2:{borderWidth:1,borderColor:'black',width:100,height:320,margin:5}});e.title='<AssetScaledImageExample>',e.description='Example component that displays the automatic scaling capabilities of the <Image /> tag',m.exports=w},666770,[3,4,5,8,9,11,15]);