react-live
react-live copied to clipboard
Add correct typings for the LivePreview component
This pull request adds the correct type definitions for the LivePreview component.
You can pass a Component
prop to the <LivePreview />
component, which will let you render a random component, and pass whatever props you want to the surrounding component. That's why the props type suggested here is so accepting.
There's a way to do this with an as-prop or something similar, but my TypeScript skills doesn't go that far.