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

How to use this hook in complex codebases #288

Closed
mertcihankurel opened this issue Nov 11, 2021 · 3 comments
Closed

How to use this hook in complex codebases #288

mertcihankurel opened this issue Nov 11, 2021 · 3 comments
Labels

Comments

@mertcihankurel
Copy link

mertcihankurel commented Nov 11, 2021

I love this hook thanks for your all efforts here. I want to implement it in our complex codebase(react + typescript) but docs are not clear descriptive for me. İs there any tutorial to show me how to use it like I'm five?

@corymharper
Copy link
Member

Hi @mcihadkurel ,

Thanks for the interest in our package, I'm glad you like it!

There isn't directly a tutorial for the usage of the hook. However, the basic usage documentation is more or less supposed to serve that purpose.Have you taken a look at it? If not, I encourage you to do so: https://sparksuite.github.io/react-accessible-dropdown-menu-hook/docs/getting-started/using

From there, if you need more detailed information about exactly what the hook returns when called, see the "Return object" documentation:

https://sparksuite.github.io/react-accessible-dropdown-menu-hook/docs/design/return-object

That provides a very details breakdown of what the whole return object contains with descriptions for each value.

Lastly, if you have or after you have reviewed that documentation, if you have specific questions about applications in certain use cases or if you have specific pain points we can address, let me know in a reply!

@mertcihankurel
Copy link
Author

mertcihankurel commented Nov 11, 2021

Hi Cory,

Thank you for your clarification. One thing that makes me confusing is, in the example you show in demo is a button. But we are using div as a dropdown menu to expand and collapse items. How can I spread this buttonProps to a div?

@corymharper
Copy link
Member

My initial suggestion is, if possible, just use buttons instead of divs. Buttons are inherently interactive where divs are not. However, to fully answer your question, full functionality for non-button menubuttons is not currently implemented in our package. You can see #69 for more information.

No one has opened a pull request to resolve that issue yet, and we always welcome new contributors to the repo!

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

No branches or pull requests

2 participants