Skip to content

Instantly share code, notes, and snippets.

@Ekwuno
Created March 6, 2019 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ekwuno/d1bbac43d32e1e8a3efc5d8b9d78ee48 to your computer and use it in GitHub Desktop.
Save Ekwuno/d1bbac43d32e1e8a3efc5d8b9d78ee48 to your computer and use it in GitHub Desktop.
/* This fires as soon as the element enters the dorm */
.list-transition-enter {
/*We give the list the initial dimension of the list button*/
top: 0;
width: 120px;
max-height: 40px;
color: transparent;
background-color: #5a564c;
}
/* This is where we can add the transition*/
.list-transition-enter-active {
top: 45px;
width: 200px;
max-height: 200px;
background-color: #9e8949;
transition: all 400ms;
}
/* This fires as soon as the this.state.showList is false */
.list-transition-exit {
top: 45px;
width: 200px;
max-height: 200px;
background-color: #9e8949;
}
/* fires as element leaves the DOM*/
.list-transition-exit-active {
top: 0;
width: 120px;
max-height: 40px;
color: transparent;
background-color: #5a564c;
transition: all 400ms;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment