Guest User

Untitled

a guest
Feb 18th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. const CSSTransitionComponent = ({ className, children, ...props }) => (
  2. <CSSTransition classNames={className} {...props}>
  3. {children}
  4. </CSSTransition>
  5. );
  6.  
  7. export const ListTransition = styled(CSSTransitionComponent)`
  8. &-enter {
  9. opacity: 0;
  10. max-height: 0;
  11. }
  12. &-enter-active {
  13. opacity: 1;
  14. max-height: ${({ maxHeight }) => maxHeight};
  15. transition: ${transition.toggle};
  16. transition-property: max-height, opacity;
  17. }
  18. &-exit {
  19. opacity: 1;
  20. max-height: ${({ maxHeight }) => maxHeight};
  21. }
  22. &-exit-active {
  23. opacity: 0;
  24. max-height: 0;
  25. transition: ${transition.toggle};
  26. transition-property: max-height, opacity;
  27. }
  28. `;
Add Comment
Please, Sign In to add comment