yocontra / react-responsive

CSS media queries in react - for responsive design, and more.
https://contra.io/react-responsive
MIT License
7.04k stars 298 forks source link

Fix #290 - Add missing type to MediaQueryProps #291

Closed ivankoop closed 2 years ago

ivankoop commented 2 years ago

Fixes issue #290

Description

Added missing children prop type to MediaQueryProps

ivankoop commented 2 years ago

I think this type needs to be children?: ReactNode | Function; as MediaQuery component does check for if (typeof children === 'function')

Also amend the Component.tsx interface MediaQueryProps, with the type change, as the d.ts is generated from that file.

Thanks @jafin , I'll take a look on those.

yocontra commented 2 years ago

Fixed in another PR