Created
September 11, 2016 21:18
-
-
Save tugberkugurlu/7a0702066ec303113519934cd99a2055 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
import 'loaders.css/loaders.css'; | |
import './index.scss'; | |
import React, { PropTypes } from 'react'; | |
const LoadingIndicator = React.createClass({ | |
propTypes: { | |
children: PropTypes.array.isRequired, | |
isLoading: PropTypes.bool.isRequired | |
}, | |
render: function() { | |
if(this.props.isLoading) { | |
return <div className="loading-indicator-holder"> | |
<div className="loader-inner square-spin inner"><div></div></div> | |
</div>; | |
} | |
return <div>{this.props.children}</div>; | |
} | |
}); | |
export default LoadingIndicator; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment