Skip to content

Instantly share code, notes, and snippets.

@mohnatus
Created April 23, 2020 08:45
Show Gist options
  • Select an option

  • Save mohnatus/18663466a8164af6a29398df9eecad1b to your computer and use it in GitHub Desktop.

Select an option

Save mohnatus/18663466a8164af6a29398df9eecad1b to your computer and use it in GitHub Desktop.
import { TextBlock, RectShape } from 'react-placeholder/lib/placeholders';
import ReactPlaceholder from 'react-placeholder';
const GhostPlaceholder = () => (
<div className='my-placeholder'>
<RectShape color='gray' style={{width: 25, height: 70}} />
<TextBlock rows={6} color='blue'/>
</div>
);
<ReactPlaceholder ready={ready} customPlaceholder={<GhostPlaceholder />}>
<MyComponent />
</ReactPlaceholder>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment