fkhadra / react-on-screen

Check if a react component in the viewport
https://fkhadra.github.io/react-on-screen/
MIT License
405 stars 50 forks source link

Make offset prop a flexible unit #40

Open HemalR opened 5 years ago

HemalR commented 5 years ago

It would be very useful for responsive design to have the offset prop be a string which would allow units to be flexible. I.e. - Instead of specifying the px height we could specify e.g. a vh unit, or rems or whatever...

Thoughts/workaround?

fkhadra commented 5 years ago

Hello,

Indeed sounds like a good idea. Do you want to make a PR for this ?

HemalR commented 5 years ago

Noobie dev who doesn't know how to do a PR 😬

Perfect time to learn I guess. I'll give it a whack!