wmira / react-icons-kit

React Svg Icons
https://react-icons-kit.vercel.app/
MIT License
370 stars 44 forks source link

Prop-types warning in recent version #24

Closed paschaldev closed 6 years ago

paschaldev commented 6 years ago

I recently upgraded to the latest version and now I get this warning in my console.

Failed prop type: Icon: prop type `size` is invalid; it must be a function, usually from the `prop-types` package, but received `undefined`.

This is my code.


import { withBaseIcon } from 'react-icons-kit'
.
.
.
const SidebarIcon = withBaseIcon({ size: 16 })

<a className="app-sidebar__list-link">
    <SidebarIcon className="app-sidebar__link-icon" icon={props.icon} /> 
    <span className="app-sidebar__link-text">{props.title}</span>
</a>
wmira commented 6 years ago

@paschaldev Thanks for reporting. This should be fixed on 1.1.3. Basically oneOfType([number, string]) should be there as size can now be a percentage ( as per latest docs in site )

wmira commented 6 years ago

pushed this in 1.1.3

paschaldev commented 6 years ago

@wmira Updated. That was fast. Thanks.