From 75afc3a7dee0312a3484fbfd45327803cde4550a Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Thu, 26 Nov 2015 17:21:08 +0000 Subject: [PATCH] Move and merge ProgressBar --- .../views/elements}/ProgressBar.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) rename src/{controllers/molecules => components/views/elements}/ProgressBar.js (59%) diff --git a/src/controllers/molecules/ProgressBar.js b/src/components/views/elements/ProgressBar.js similarity index 59% rename from src/controllers/molecules/ProgressBar.js rename to src/components/views/elements/ProgressBar.js index c711650a25..bab6a701dd 100644 --- a/src/controllers/molecules/ProgressBar.js +++ b/src/components/views/elements/ProgressBar.js @@ -18,9 +18,21 @@ limitations under the License. var React = require('react'); -module.exports = { +module.exports = React.createClass({ + displayName: 'ProgressBar', propTypes: { value: React.PropTypes.number, max: React.PropTypes.number }, -}; + + 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 ( +
+ ); + } +}); \ No newline at end of file