codecks-io / react-sticky-box

Sticky boxes for contents of all sizes
https://react-sticky-box.codecks.io/
ISC License
469 stars 44 forks source link

StickyBox data attributes should be transfers to created div container #49

Closed sunsetninja closed 2 years ago

sunsetninja commented 4 years ago

Hi! Thank you for your project. Can you please add data attributes transfer to StickyBox element? For example, if you want to set data-testid on created by StickyBox div container probably the most intuitive way to do this is set it like this <StickyBox data-testid="some-testid" />. But now you have to create another inner div element for this and add to it some css.

danielberndt commented 2 years ago

v1.0.0 was just released which allows using a hook to apply the StickyBox behaviour to any element.