-
Notifications
You must be signed in to change notification settings - Fork 45.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom class names in ReactCSSTransitionGroup #3761
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,8 +48,8 @@ var ReactCSSTransitionGroupChild = React.createClass({ | |
|
||
transition: function(animationType, finishCallback) { | ||
var node = React.findDOMNode(this); | ||
var className = this.props.name + '-' + animationType; | ||
var activeClassName = className + '-active'; | ||
var className = this.props.name[animationType] || this.props.name + '-' + animationType; | ||
var activeClassName = this.props.name[animationType + 'Active'] || className + '-active'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should perhaps write some tests to make sure these work :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't seem to get tests to work :/ any suggestions on how I should approach it? There aren't currently any tests to make sure the classnames are correct. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @zpao can you help on this? I would also love to help out on this if i can. Maybe with the test? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, sorry! I missed this comment. Let's skip the test for now. Just make sure There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sounds good, ill make sure appear works and put something up today |
||
var noEventTimeout = null; | ||
|
||
var endListener = function(e) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make sure we support
appear
in the object as well.