react-placeholder icon indicating copy to clipboard operation
react-placeholder copied to clipboard

Multiple placeholder with animation

Open k4mr4n opened this issue 7 years ago • 2 comments

Hello how can I have multiple placeholder to point out the list view? the way I achieved this: screen.js

isLoading ? [...Array(5)].map((o, i) => (<LoadingComponent key={i} />)) : (<List />)

and in LoadingComponent (actual code is more complicated):

<div style={styles.wrapper}>
    <ReactPlaceholder type='rect' showLoadingAnimation />
    <ReactPlaceholder type='text' showLoadingAnimation />
</div>

the problem here is I wanted to have an animation so I used ReactPlaceholder instead of RectShape or TextBlock, so I encounter warning: The prop `ready` is marked as required in `ReactPlaceholder` and The prop `children` is marked as required in `ReactPlaceholder

k4mr4n avatar Mar 26 '18 11:03 k4mr4n

I could pass null as a child and ready={false} but is there any better solution here?

k4mr4n avatar Mar 26 '18 11:03 k4mr4n

I had the same issue, was wondering the same

m-salamon avatar Sep 07 '18 16:09 m-salamon