pulsingIndicator.tsx 699 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import {css, keyframes, Theme} from '@emotion/react';
  2. const pulse = keyframes`
  3. 0% {
  4. transform: scale(0.1);
  5. opacity: 1
  6. }
  7. 40%, 100% {
  8. transform: scale(0.8);
  9. opacity: 0;
  10. }
  11. `;
  12. const pulsingIndicatorStyles = (p: {theme: Theme}) => css`
  13. height: 8px;
  14. width: 8px;
  15. border-radius: 50%;
  16. background: ${p.theme.pink300};
  17. position: relative;
  18. &:before {
  19. content: '';
  20. display: block;
  21. position: absolute;
  22. height: 100px;
  23. width: 100px;
  24. border-radius: 50%;
  25. top: -46px;
  26. left: -46px;
  27. border: 4px solid ${p.theme.pink200};
  28. transform-origin: center;
  29. animation: ${pulse} 3s ease-out infinite;
  30. }
  31. `;
  32. export default pulsingIndicatorStyles;