JedWatson / react-tappable

Tappable component for React
http://jedwatson.github.io/react-tappable/
MIT License
863 stars 90 forks source link

Add optional "style" prop #3

Closed harborhoffer closed 9 years ago

harborhoffer commented 9 years ago

Tappable is excellent. Thanks for this. Some of the elements I am making tappable need some inline styling. Would be great if you could pass in a style prop that gets merged with the inline styles Tappable is currently injecting. Should I start a pull request?

JedWatson commented 9 years ago

Thanks @harborhoffer!

Saving you a PR, I've just added it and released 0.2.4 with support for the style prop :)

harborhoffer commented 9 years ago

Awesome, thanks!

harborhoffer commented 9 years ago

Woops. Looks like there is a bug in the latest release with style support. if (!source || Object.prototype.toString.call(obj) !== '[object Object]') return target;

I believe in Object.prototype.toString.call(obj) you want to check source instead of obj.