Then in my code, if I want custom placeholder height, I could do something like:
class MyOwnSticky extends Sticky {
getPlaceholderHeight(placeholder, content) {
// My custom height, I could just return any number I want here
return 20;
}
}
...
<StickyContainer>
<MyOwnSticky topOffset={123}>
{() => {...}}
</MyOwnSticky>
</StickyContainer>
I'm not sure whether that's the "best" way.
I'm trying to avoid using CSS.
Hello,
Is there a way to have custom padding placeholder? https://github.com/captivationsoftware/react-sticky/blob/master/src/Sticky.js#L59
Maybe expose this particular section:
To be something like:
Then in my code, if I want custom placeholder height, I could do something like:
I'm not sure whether that's the "best" way. I'm trying to avoid using CSS.
Reading these 2 issues seem to be utilizing CSS: https://github.com/captivationsoftware/react-sticky/issues/125 https://github.com/captivationsoftware/react-sticky/issues/151