aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/trialStatusBar/components/ProgressBar.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/features/trialStatusBar/components/ProgressBar.js')
-rw-r--r--src/features/trialStatusBar/components/ProgressBar.js46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/features/trialStatusBar/components/ProgressBar.js b/src/features/trialStatusBar/components/ProgressBar.js
new file mode 100644
index 000000000..80d478d8c
--- /dev/null
+++ b/src/features/trialStatusBar/components/ProgressBar.js
@@ -0,0 +1,46 @@
1import React, { Component } from 'react';
2import PropTypes from 'prop-types';
3import { observer } from 'mobx-react';
4import injectSheet from 'react-jss';
5
6const styles = theme => ({
7 root: {
8 background: theme.trialStatusBar.progressBar.background,
9 width: '25%',
10 maxWidth: 200,
11 height: 8,
12 display: 'flex',
13 alignItems: 'center',
14 borderRadius: theme.borderRadius,
15 overflow: 'hidden',
16 },
17 progress: {
18 background: theme.trialStatusBar.progressBar.progressIndicator,
19 width: ({ percent }) => `${percent}%`,
20 height: '100%',
21 },
22});
23
24@injectSheet(styles) @observer
25class ProgressBar extends Component {
26 static propTypes = {
27 classes: PropTypes.object.isRequired,
28 percent: PropTypes.number.isRequired,
29 };
30
31 render() {
32 const {
33 classes,
34 } = this.props;
35
36 return (
37 <div
38 className={classes.root}
39 >
40 <div className={classes.progress} />
41 </div>
42 );
43 }
44}
45
46export default ProgressBar;