| 1 |
const ProgressBar = (props) => { |
| 2 |
const styles = { |
| 3 |
wrapper: { |
| 4 |
padding: '5px', |
| 5 |
}, |
| 6 |
container: { |
| 7 |
height: '20px', |
| 8 |
overflow: 'hidden', |
| 9 |
borderRadius: '14px', |
| 10 |
backgroundColor: '#F1F1F1', |
| 11 |
boxShadow: 'inset 0px 1px 4px rgba(0, 0, 0, 0.09487)', |
| 12 |
}, |
| 13 |
progress: { |
| 14 |
width: props.percent + '%', |
| 15 |
height: 'inherit', |
| 16 |
borderRadius: 'inherit', |
| 17 |
background: props.color, |
| 18 |
backgroundBlendMode: 'multiply', |
| 19 |
}, |
| 20 |
}; |
| 21 |
|
| 22 |
return ( |
| 23 |
<div style={styles.wrapper}> |
| 24 |
<div style={styles.container}> |
| 25 |
<div style={styles.progress}></div> |
| 26 |
</div> |
| 27 |
</div> |
| 28 |
); |
| 29 |
}; |
| 30 |
|
| 31 |
export default ProgressBar; |
| 32 |
|