Created
February 25, 2019 15:00
-
-
Save Nedson202/34bf20e1b24870bfdb9bc29dd291f473 to your computer and use it in GitHub Desktop.
Content loader for images
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, { Component, Fragment } from 'react'; | |
import ContentLoader from 'react-content-loader'; | |
class ImageLoader extends Component { | |
render() { | |
const { size: { height, width } } = this.props; | |
return ( | |
<Fragment> | |
<ContentLoader | |
rtl | |
height={height} | |
width={width} | |
speed={2} | |
primaryColor="#f3f3f3" | |
> | |
<rect x="0" y="0" rx="3" ry="3" width="201" height="272" /> | |
</ContentLoader> | |
</Fragment> | |
); | |
} | |
} | |
export default ImageLoader; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment