buildo / react-placeholder

A React component to easily replicate your page with nice placeholders while the content is loading
MIT License
1.61k stars 97 forks source link

Add a "custom-placeholder" default style for showLoadingAnimation #93

Open burkeshartsis opened 4 years ago

burkeshartsis commented 4 years ago

Currently if you pass showLoadingAnimation while using a custom placeholder you have to make sure your custom placeholder includes one of the the default style class decelerations. Adding a custom-placeholder class here and passing it by default to all custom placeholders would mean <ReactPlaceholder customPlaceholder={<StyledLine />} showLoadingAnimation /> would just work ⚡

2hands10fingers commented 3 years ago

I'm unable to get the showLaodingAnimation prop to work as shown in the documentation. I had to explicitly add a class of "show-loading-animation".