Last active
December 4, 2017 21:00
-
-
Save perjansson/ac254ea89d24be6f0b11362f54f89520 to your computer and use it in GitHub Desktop.
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
| style = loading => { | |
| return { | |
| transition: '0.5s filter linear', | |
| filter: `${loading ? 'blur(50px)' : ''}`, | |
| } | |
| } | |
| render() { | |
| const { currentImage, loading } = this.state | |
| const { alt } = this.props | |
| return <img style={this.style(loading)} src={currentImage} alt={alt} /> | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment