Skip to content

Instantly share code, notes, and snippets.

@morten-olsen
Created February 2, 2016 09:53
Show Gist options
  • Select an option

  • Save morten-olsen/def512646030b1ec28dc to your computer and use it in GitHub Desktop.

Select an option

Save morten-olsen/def512646030b1ec28dc to your computer and use it in GitHub Desktop.
.enter {
opacity: .01;
}
.enter > div > div {
transform: translateY(1000px) scale(1, 3);
opacity: .01;
}
.enterActive {
opacity: 1;
transition: all 300ms linear;
transition-delay: 200ms;
}
.enterActive > div > div {
transform: translateY(0);
opacity: 1;
transition: all 500ms ease-out;
}
.leave {
opacity: 1;
}
.leave > div > div {
transform: translateY(0);
opacity: 1;
}
.leaveActive {
transition: all 300ms ease-in;
opacity: .01;
}
.leaveActive > div > div {
transform: translateY(1000px) scale(1, 3);
transition: all 300ms ease-in;
opacity: .01;
}
import animation from './modal.css';
React.render(
<ReactCSSTransitionGroup transitionName={animation} transitionEnterTimeout={500} transitionLeaveTimeout={300}>
</ReactCSSTransitionGroup>
, document.getElementById('mount')
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment