retyui / react-quick-pinch-zoom

A react component that providing multi-touch gestures for zooming and dragging on any DOM element.
https://react-quick-pinch-zoom.netlify.app/
310 stars 47 forks source link

Export public API types #45

Closed matt-tingen closed 2 years ago

matt-tingen commented 2 years ago

This exports types which are part of public APIs. The component props type requires a separate type because on how defaultProps is treated on components.

retyui commented 2 years ago

This outdated approche, please check then next links for full understanding how default props types is casting now

// it should be enough:
export type PinchZoomProps = JSX.LibraryManagedAttributes<typeof PinchZoomComp,React.ComponentProps<typeof PinchZoomComp>>
retyui commented 2 years ago

Thanks!

retyui commented 2 years ago
matt-tingen commented 2 years ago

Thanks for the quick reviews and release!