Created
January 28, 2016 18:58
-
-
Save waynelkh/b75285970effb0409735 to your computer and use it in GitHub Desktop.
Loading component like youtube, only send boolean to display or not
This file contains hidden or 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
import React, { PropTypes } from 'react' | |
import LinearProgress from 'material-ui/lib/linear-progress'; | |
const LoadingProgress = ({ isLoading }) => { | |
return ( isLoading ? | |
<LinearProgress | |
color={"rgb(255, 0, 20)"} | |
mode="indeterminate" | |
style={{ | |
position: 'fixed', | |
top: '64px', | |
left: '0px', | |
}} | |
/> : ''); | |
} | |
LoadingProgress.propTypes = { | |
isLoading: PropTypes.bool.isRequired, | |
} | |
export default LoadingProgress; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment