forked from aces/Loris
-
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 loadingbar and incorporated into the filterabledatatable
- Loading branch information
Showing
3 changed files
with
53 additions
and
1 deletion.
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
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,47 @@ | ||
// ########### CBIGR START ########### | ||
import React from 'react'; | ||
|
||
/** | ||
* LoadingBar is a React component which shows a loading bar while | ||
* something is loading. | ||
* | ||
* @param {array} props - The React props | ||
* | ||
* @return {DOMObject} - Loading Bar React component | ||
*/ | ||
function LoadingBar(props) { | ||
const {progress} = props; | ||
|
||
const wrapperStyle = { | ||
margin: 50, | ||
}; | ||
|
||
const containerStyles = { | ||
height: 5, | ||
backgroundColor: '#e0e0de', | ||
borderRadius: 50, | ||
}; | ||
|
||
const fillerStyles = { | ||
height: '100%', | ||
width: `${progress}%`, | ||
backgroundColor: '#E89A0C', | ||
borderRadius: 'inherit', | ||
textAlign: 'right', | ||
transition: 'width 1s linear', | ||
}; | ||
|
||
const progressBar = progress >= 0 ? ( | ||
<div style={wrapperStyle}> | ||
<h5 className='animate-flicker'>Loading...</h5> | ||
<div style={containerStyles}> | ||
<div style={fillerStyles}/> | ||
</div> | ||
</div> | ||
) : null; | ||
|
||
return progressBar; | ||
}; | ||
|
||
export default LoadingBar; | ||
// ########### CBIGR END ########### |
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