StyledAvatar.jsx 786 B

12345678910111213141516171819202122232425262728293031
  1. import { styled } from '@mui/material/styles';
  2. import Badge from '@mui/material/Badge';
  3. export const StyledAvatar = styled(Badge)(({ theme }) => ({
  4. '& .MuiBadge-badge': {
  5. backgroundColor: '#44b700',
  6. color: '#44b700',
  7. boxShadow: `0 0 0 2px ${theme.palette.background.paper}`,
  8. '&::after': {
  9. position: 'absolute',
  10. top: 0,
  11. left: 0,
  12. width: '100%',
  13. height: '100%',
  14. borderRadius: '50%',
  15. animation: 'ripple 1.2s infinite ease-in-out',
  16. border: '1px solid currentColor',
  17. content: '""',
  18. },
  19. },
  20. '@keyframes ripple': {
  21. '0%': {
  22. transform: 'scale(.8)',
  23. opacity: 1,
  24. },
  25. '100%': {
  26. transform: 'scale(2.4)',
  27. opacity: 0,
  28. },
  29. },
  30. }));