asmyshlyaev177/react-horizontal-scrolling-menu

Export Context Provider as seperate component

Closed this issue · 1 comments

Is your feature request related to a problem? Please describe.
It is currently not possible to use elements like buttons or custom functions for controlling the list outside of the ScrollMenu component

Describe the solution you'd like
Export the Context Provider as a separate component in order to make more flexible layouts possible. This also allows any of the context properties to be accessed by other components

Describe alternatives you've considered
I'm currently saving values from the library context in my own one. However this ends up becoming really messy quickly

Additional context

This is the current way:

Bildschirmfoto 2024-02-13 um 15 33 36

This is the new proposal:

Bildschirmfoto 2024-02-13 um 15 30 00

Hi, tnx for interest to my library.

I don't think it's possible to use Provider separately, it's providing values from tracked children, if it is outside of ScrollMenu it doesn't have access to items.

You can create PR with proof of concept how it should work.