Reshuffle to put "HTML" (JSX) and CSS together as a theme with logic elsewhere.
This commit is contained in:
parent
cc4fa6140c
commit
a022a4b9a6
37 changed files with 56 additions and 54 deletions
19
themes/base/views/molecules/ProgressBar.js
Normal file
19
themes/base/views/molecules/ProgressBar.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
var React = require('react');
|
||||
|
||||
var ProgressBarController = require("../../../../src/controllers/molecules/ProgressBar");
|
||||
|
||||
module.exports = React.createClass({
|
||||
displayName: 'ProgressBar',
|
||||
mixins: [ProgressBarController],
|
||||
|
||||
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>
|
||||
);
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue