Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. ${({ visible }) =>
  2. visible &&
  3. `
  4. animation-name: show;
  5. animation-delay: 0s;
  6. `};
  7.  
  8. ${({ autoClose }) =>
  9. autoClose &&
  10. `
  11. animation-delay: 10s;
  12. animation-name: hide;
  13. `};
  14.  
  15. store.dispatch(showAction()); // Sets visible to true
  16.  
  17. setTimeout(() => {
  18. store.dispatch(closeAction()); // sets autoClose to true
  19. }, 10000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement