Skip to content

Instantly share code, notes, and snippets.

@waynelkh
Created January 28, 2016 18:58
Show Gist options
  • Save waynelkh/b75285970effb0409735 to your computer and use it in GitHub Desktop.
Save waynelkh/b75285970effb0409735 to your computer and use it in GitHub Desktop.
Loading component like youtube, only send boolean to display or not
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