mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Prettier the rest of ReactNative
Reviewed By: yungsters Differential Revision: D7974340 fbshipit-source-id: 5fe457a8a9be4bd360fc3af9acb5c1136b2be0d7
This commit is contained in:
committed by
Facebook Github Bot
parent
aba4ec0c09
commit
36fcbaa56d
@@ -4,8 +4,10 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
* @flow
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var ProgressBar = require('ProgressBarAndroid');
|
||||
@@ -22,17 +24,15 @@ var MovingBar = createReactClass({
|
||||
|
||||
getInitialState: function() {
|
||||
return {
|
||||
progress: 0
|
||||
progress: 0,
|
||||
};
|
||||
},
|
||||
|
||||
componentDidMount: function() {
|
||||
this.setInterval(
|
||||
() => {
|
||||
var progress = (this.state.progress + 0.02) % 1;
|
||||
this.setState({progress: progress});
|
||||
}, 50
|
||||
);
|
||||
this.setInterval(() => {
|
||||
var progress = (this.state.progress + 0.02) % 1;
|
||||
this.setState({progress: progress});
|
||||
}, 50);
|
||||
},
|
||||
|
||||
render: function() {
|
||||
@@ -60,7 +60,11 @@ class ProgressBarAndroidExample extends React.Component<{}> {
|
||||
</RNTesterBlock>
|
||||
|
||||
<RNTesterBlock title="Horizontal Blue ProgressBar">
|
||||
<MovingBar styleAttr="Horizontal" indeterminate={false} color="blue" />
|
||||
<MovingBar
|
||||
styleAttr="Horizontal"
|
||||
indeterminate={false}
|
||||
color="blue"
|
||||
/>
|
||||
</RNTesterBlock>
|
||||
</RNTesterPage>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user