Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support something else than React? #2

Open
ergo opened this issue Jun 25, 2018 · 2 comments
Open

Support something else than React? #2

ergo opened this issue Jun 25, 2018 · 2 comments

Comments

@ergo
Copy link

ergo commented Jun 25, 2018

Hi, is there a chance that common functionality can be split out so this module could use used with other frameworks too?

@zzarcon
Copy link
Owner

zzarcon commented Jun 26, 2018

Hi @ergo that sounds like a good idea.

If we do so in a way that we can reuse it easily, we can just make react-scroll-shadow to depend on that other lib.

We should probably came up first with an api for that library, maybe something like:

import ScrollShadow from 'scroll-shadow'

const shadows = new ScrollShadow(document.body, {/*options*/})

shadows.listen();
shadows.remove();

Thoughts?

@ergo
Copy link
Author

ergo commented Jun 26, 2018

Yeah, sounds good, I was thinking about wrapping this into web component.
But that means that in that example document.body would be just a node somewhere, It would not have access to document.body I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants