olahol / react-social

Simple React components for social buttons (Facebook, Twitter and Pinterest) and social counts.
177 stars 60 forks source link

Element could also be react component #32

Closed jonashaefele closed 8 years ago

jonashaefele commented 8 years ago

I tried feeding the share buttons a React component (a custom button) rather than just the string name of a html tag. It works perfectly. props get passed down and the component gets rendered nicely.

However react raised a PropType warning, since the validation requires a string.

warning.js:45 Warning: Failed propType: Invalid prop `element` of type `function` supplied to `FacebookButton`, expected `string`. 

This should be easy to fix by adding function to the possible PropTypes.