-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
var React = require('react'); | ||
|
||
var component = React.createClass({ | ||
displayName: 'component', | ||
export default class Progress extends React.component { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
paramaggarwal
Author
Contributor
|
||
|
||
render: function () { | ||
render() { | ||
|
||
var completed = +this.props.completed; | ||
if (completed < 0) { | ||
const completed = +this.props.completed; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
paramaggarwal
Author
Contributor
|
||
if (completed = NaN || completed < 0) { | ||
This comment has been minimized.
Sorry, something went wrong.
jonathanong
|
||
completed = 0; | ||
}; | ||
if (completed > 100) { | ||
completed = 100; | ||
}; | ||
|
||
var style = { | ||
const style = { | ||
backgroundColor: this.props.color || '#0BD318', | ||
width: completed + '%', | ||
transition: "width 200ms", | ||
|
@@ -30,6 +29,4 @@ var component = React.createClass({ | |
) | ||
); | ||
} | ||
}); | ||
|
||
module.exports = component; | ||
}; |
now you have to compile your node moduels with babel for htis to work