-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Progress Bar and build script.
- Loading branch information
Showing
8 changed files
with
115 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Basic Ignores | ||
/node_modules | ||
package-lock.json | ||
package-lock.json | ||
/build |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/*! | ||
========================================================= | ||
* BLK Design System PRO React - v1.0.0 | ||
========================================================= | ||
* Product Page: https://www.creative-tim.com/product/blk-design-system-pro-react | ||
* Copyright 2019 Creative Tim (https://www.creative-tim.com) | ||
* Coded by Creative Tim | ||
========================================================= | ||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
*/ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
|
||
import { Progress as ProgressBar } from 'reactstrap' | ||
|
||
// Add your info to the docs if you edit this! | ||
|
||
/** | ||
* ### Baseline progress bar! | ||
* | ||
* @version 0.0.1 | ||
* @author Noah Templet ([w3aseL](https://github.com/w3aseL)) | ||
*/ | ||
class Progress extends React.Component { | ||
constructor(props) { | ||
super(props) | ||
} | ||
|
||
static propTypes = { | ||
/** | ||
* The value of the progress bar. | ||
*/ | ||
value: PropTypes.number.isRequired, | ||
/** | ||
* The maximum value of the progress bar. | ||
*/ | ||
max: PropTypes.number, | ||
/** | ||
* The label for the progress bar. | ||
*/ | ||
label: PropTypes.string, | ||
/** | ||
* The color of the progress bar. | ||
*/ | ||
color: PropTypes.string | ||
} | ||
|
||
static defaultProps = { | ||
max: 100, | ||
label: "Default" | ||
} | ||
|
||
render() { | ||
const { value, max, label, color } = this.props | ||
|
||
return ( | ||
<div className={`progress-container ${color ? `progress-${color}` : ""}`}> | ||
<span className="progress-badge">{label}</span> | ||
<ProgressBar max={max} value={value}> | ||
<span className="progress-value">{((value / max) * 100).toFixed(0)}%</span> | ||
</ProgressBar> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export { Progress } | ||
|
||
export default Progress |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
### Progress Bar Syntax | ||
|
||
Importing the progress bar. | ||
```js static | ||
import Progress from 'revibe-component-library/Progress' | ||
|
||
import { Progress } from 'revibe-component-library' | ||
``` | ||
|
||
### Progress Simple Example | ||
```js | ||
<Progress value={25} /> | ||
``` | ||
|
||
### Progress Color Examples | ||
```js | ||
<Progress value={25} /> | ||
<Progress value={30} color="primary" label="Primary" /> | ||
<Progress value={35} color="secondary" label="Secondary" /> | ||
<Progress value={40} color="info" label="Info" /> | ||
<Progress value={45} color="success" label="Success" /> | ||
<Progress value={50} color="warning" label="Warning" /> | ||
<Progress value={55} color="danger" label="Danger" /> | ||
``` | ||
|
||
### Progress Max Examples | ||
```js | ||
<Progress value={25} max={75} color="primary" label="25/75" /> | ||
``` |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"main": "Progress.jsx" | ||
} |
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
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