HermanNygaard / react-scroll-to-top

Lightweight button component for scrolling to the top of a page
https://www.npmjs.com/package/react-scroll-to-top
MIT License
61 stars 12 forks source link

mount/unmount Animation (issue #48) #53

Open prajwal-np opened 1 year ago

prajwal-np commented 1 year ago

48

prajwal-np commented 1 year ago

@HermanNygaard I have created PR for mount and unmount animation please review it and let me know if this is acceptable or not.

HermanNygaard commented 1 year ago

@prajwal-np thanks a lot! I suppose an alternative solution would be to not conditionally render the button, and instead use CSS for visibility. That way we don't need the delayMount hook. What do you think?

I'm also not sure what animation we should default to (if any?). There should be a way to override the animation.