Raathigesh / retoggle

🎨 UI controls as React Hooks to control your component state from outside
https://retoggle.netlify.com/
MIT License
1.38k stars 27 forks source link

✨ support for multiple inspectors via context #29

Closed ammmze closed 4 years ago

ammmze commented 4 years ago

its not the api proposed here, but it should give enough flexibility to accomplish what was being requested. i'm personally looking to use this in a project using react-styleguidist where I can swap out the ReactExample component they use and apply an inspector provider on it.

Note: i've been able to maintain backwards compatibility with the documented custom knob api with the caveat that it would only apply to the global inspector, not any of the ones inside an InspectorProvider. I've deprecated those api methods as the preferred method is to use the inspector context to register the knobs.

Raathigesh commented 4 years ago

Hi, This looks really great. I'm going merge this into master and have a play around with it. If it looks good, I'll push a release to npm.

Raathigesh commented 4 years ago

I also invited you to the project as a collaborator.

Raathigesh commented 4 years ago

Published as version 1.0.0 to npm.

ammmze commented 4 years ago

👍 thank you