Created
December 28, 2018 18:28
-
-
Save ilonacodes/1e615482ca9f03c958272a874c06cc09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ProgressBar.js | |
import React from 'react'; | |
// the custom styling for progress bar app | |
import './progress-bar.css'; | |
// pass percentRange state through props to Range an ProgressBar components | |
const Range = (props) => { | |
return ( | |
// render current the filled range of progress bar along its width | |
<div className="range" style={{width: `${props.percentRange}%`}}/> | |
); | |
}; | |
const ProgressBar = (props) => { | |
return ( | |
<div className="progress-bar"> | |
{/*render available progress bar’s limit*/} | |
<Range percentRange={props.percentRange}/> | |
</div> | |
); | |
}; | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment