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

Forward all properties. #19

Open
mareksuscak opened this issue Oct 1, 2017 · 2 comments
Open

Forward all properties. #19

mareksuscak opened this issue Oct 1, 2017 · 2 comments

Comments

@mareksuscak
Copy link

It's a good rule of thumb to forward all unrecognized properties that were passed down.

@nhunzaker
Copy link
Contributor

Which part of the component should we forward unrecognized props to? This is the structure of a focus trap:

<div class="focus-trap-wrapper">
  <div class="focus-trap-backdrop" />
  <div class="focus-trap">
    {children}
  </div>
</div>

Ignoring the backdrop, should unrecognized props be forwarded to focus-trap-wrapper, or focus-trap?

@mareksuscak
Copy link
Author

That's a good question. I guess it depends. I usually pass them to the top level container. It's worth to mention, though, that it might not be the perfect solution in all cases.

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