Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame^] | 1 | import React from 'react'; |
| 2 | |
| 3 | class ProgressBar extends React.Component { |
| 4 | static propTypes = { |
| 5 | label: React.PropTypes.string, |
| 6 | now: React.PropTypes.string.isRequired |
| 7 | } |
| 8 | render() { |
| 9 | let {label, now} = this.props; |
| 10 | |
| 11 | return( |
| 12 | <div className='progress-bar-view'> |
| 13 | <div className='progress-bar-outside'> |
| 14 | <div style={{width: now + '%'}} className='progress-bar-inside'></div> |
| 15 | </div> |
| 16 | <div className='progress-bar-view-label'>{label}</div> |
| 17 | </div> |
| 18 | ); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | export default ProgressBar; |