UNPKG

crn-cli

Version:

The Ctrip React Native CLI Tools

1 lines 1.69 kB
__d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),o=r(d[2]),l=r(d[3]),s=r(d[4]),c=r(d[5]),u=r(d[6]),p=r(d[7]),h=r(d[8]),v=r(d[9]),f=(function(h){function v(){var t,o;n(this,v);for(var c=arguments.length,u=new Array(c),p=0;p<c;p++)u[p]=arguments[p];return(o=l(this,(t=s(v)).call.apply(t,[this].concat(u))))._intervalID=null,o.state={progress:0},o}return c(v,h),o(v,[{key:"componentDidMount",value:function(){var t=this;this._intervalID=setInterval(function(){var n=(t.state.progress+.02)%1;t.setState({progress:n})},50)}},{key:"componentWillUnmount",value:function(){null!=this._intervalID&&clearInterval(this._intervalID)}},{key:"render",value:function(){return p.createElement(u,t({progress:this.state.progress},this.props))}}]),v})(p.Component),E=(function(t){function E(){return n(this,E),l(this,s(E).apply(this,arguments))}return c(E,t),o(E,[{key:"render",value:function(){return p.createElement(v,{title:"ProgressBar Examples"},p.createElement(h,{title:"Horizontal Indeterminate ProgressBar"},p.createElement(u,{styleAttr:"Horizontal"})),p.createElement(h,{title:"Horizontal ProgressBar"},p.createElement(f,{styleAttr:"Horizontal",indeterminate:!1})),p.createElement(h,{title:"Horizontal Black Indeterminate ProgressBar"},p.createElement(u,{styleAttr:"Horizontal",color:"black"})),p.createElement(h,{title:"Horizontal Blue ProgressBar"},p.createElement(f,{styleAttr:"Horizontal",indeterminate:!1,color:"blue"})))}}]),E})(p.Component);e.title='<ProgressBarAndroid>',e.description='Horizontal bar to show the progress of some operation.',e.examples=[{title:'Simple progress bar',render:function(){return p.createElement(E,null)}}]},666820,[14,3,4,5,8,9,358,54,666679,666681]);