Last active
June 25, 2017 23:20
-
-
Save ianwcarlson/758c0da952dee91919f3ba2d56d6d286 to your computer and use it in GitHub Desktop.
Goto React Opacity Animation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import css from './OpacityAnimation.css'; | |
import ReactCSSTransitionGroup from 'react-addons-css-transition-group'; | |
const OpacityAnimation = ({ children }) => ( | |
<ReactCSSTransitionGroup | |
transitionName={css.opacityTransition} | |
transitionAppear | |
transitionEnter | |
transitionLeave | |
transitionAppearTimeout={300} | |
transitionEnterTimeout={300} | |
transitionLeaveTimeout={300} | |
> | |
{children} | |
</ReactCSSTransitionGroup> | |
); | |
export default OpacityAnimation; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment