Created
January 5, 2018 15:15
-
-
Save fpersico/3d79d28b9a72817c6803986abeb03e9b to your computer and use it in GitHub Desktop.
ImageDerivative
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 from 'react'; | |
class ImageDerivative extends React.PureComponent { | |
render() { | |
const { image, derivative } = this.props; | |
const url = image.meta.derivatives[derivative]; | |
return <img src={url} alt={image.filename} />; | |
} | |
} | |
export default ImageDerivative; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment