Skip to content

Instantly share code, notes, and snippets.

@Nedson202
Created February 25, 2019 15:00
Show Gist options
  • Save Nedson202/34bf20e1b24870bfdb9bc29dd291f473 to your computer and use it in GitHub Desktop.
Save Nedson202/34bf20e1b24870bfdb9bc29dd291f473 to your computer and use it in GitHub Desktop.
Content loader for images
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