2015-06-11 17:23:02 +00:00
|
|
|
var React = require('react');
|
|
|
|
|
2015-06-23 13:40:50 +00:00
|
|
|
var ProgressBarController = require("../../../../src/controllers/molecules/ProgressBar");
|
2015-06-19 11:53:48 +00:00
|
|
|
|
2015-06-11 17:23:02 +00:00
|
|
|
module.exports = React.createClass({
|
2015-06-19 15:21:09 +00:00
|
|
|
displayName: 'ProgressBar',
|
2015-06-19 11:53:48 +00:00
|
|
|
mixins: [ProgressBarController],
|
2015-06-11 17:23:02 +00:00
|
|
|
|
|
|
|
render: function() {
|
|
|
|
// Would use an HTML5 progress tag but if that doesn't animate if you
|
|
|
|
// use the HTML attributes rather than styles
|
|
|
|
var progressStyle = {
|
|
|
|
width: ((this.props.value / this.props.max) * 100)+"%"
|
|
|
|
};
|
|
|
|
return (
|
|
|
|
<div className="mx_ProgressBar"><div className="mx_ProgressBar_fill" style={progressStyle}></div></div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|