JedWatson / react-tappable

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

Support for active and inactive classes #61

Closed rudin closed 8 years ago

rudin commented 8 years ago

Support for active and inactive classes, kinda like Custom Classes for ReactCSSTransitionGroup in React v0.14.

<Tappable classes={{active: css.itemactive, inactive: css.item}} ......

A necessity when using 'css modules' where every classname becomes unique. https://github.com/css-modules/css-modules

JedWatson commented 8 years ago

Thanks @rudin! Do you think that separate props for activeClassName and inactiveClassName would be clearer though? That way the props are self documenting

JedWatson commented 8 years ago

Just released this with v0.7.2 :+1:

ianwith commented 8 years ago

@JedWatson Great! that's just what i needed. So, should I use activeClassName or classes={{active: css.itemactive}} ?

JedWatson commented 8 years ago

classes={{active: css.itemactive, inactive: css.iteminactive}}