Last active
December 3, 2019 11:11
-
-
Save siljanoskam/880b634337b457f732bc84deb12d88a1 to your computer and use it in GitHub Desktop.
Loader
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 React from 'react'; | |
import '../Loader.css'; | |
class Loader extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
visible: false | |
}; | |
this.updateLoaderVisibility = this.updateLoaderVisibility.bind(this); | |
} | |
updateLoaderVisibility(status) { | |
this.setState({visible: status}); | |
}; | |
render() { | |
return <div id="loader" className={`float-right ${!this.state.visible ? 'd-none' : ''}`}> | |
<div className="lds-roller"> | |
<div></div> | |
<div></div> | |
<div></div> | |
</div> | |
<p>Please wait...</p> | |
</div> | |
} | |
} | |
export default Loader; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment