react-live icon indicating copy to clipboard operation
react-live copied to clipboard

Add correct typings for the LivePreview component

Open selbekk opened this issue 2 years ago • 0 comments

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.

selbekk avatar Feb 28 '22 21:02 selbekk