Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 1799 | Rev 3169 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
5 stevensc 1
import React from 'react'
1360 stevensc 2
import { Box, styled } from '@mui/material'
5 stevensc 3
 
1360 stevensc 4
const EllipsisContainer = styled(Box)`
1774 stevensc 5
  margin: 0 auto;
1770 stevensc 6
  width: 80px;
7
  height: 80px;
8
  border-radius: 100px;
9
  background-color: #fff;
10
  border: 1px solid #e1e1e1;
1771 stevensc 11
  display: flex;
12
  align-items: center;
1773 stevensc 13
  justify-content: space-evenly;
1770 stevensc 14
  .bounce {
1772 stevensc 15
    width: 13px;
16
    height: 13px;
1770 stevensc 17
    background-color: #b9b9b9;
18
    border-radius: 100%;
5 stevensc 19
    display: inline-block;
1773 stevensc 20
    transform-origin: center;
1770 stevensc 21
    -webkit-animation: bounce_delay 1.4s infinite ease-in-out both;
22
    animation: bounce_delay 1.4s infinite ease-in-out both;
5 stevensc 23
  }
1770 stevensc 24
  .bounce:nth-child(1) {
25
    -webkit-animation-delay: -0.32s;
26
    animation-delay: -0.32s;
5 stevensc 27
  }
1770 stevensc 28
  .bounce:nth-child(2) {
29
    -webkit-animation-delay: -0.16s;
30
    animation-delay: -0.16s;
5 stevensc 31
  }
1770 stevensc 32
  .bounce:nth-child(3) {
33
    -webkit-animation-delay: 0;
34
    animation-delay: 0;
5 stevensc 35
  }
1770 stevensc 36
  @keyframes bounce_delay {
37
    0%,
38
    80%,
39
    100% {
40
      -webkit-transform: scale(0);
5 stevensc 41
      transform: scale(0);
42
    }
1770 stevensc 43
    40% {
44
      -webkit-transform: scale(1);
5 stevensc 45
      transform: scale(1);
46
    }
47
  }
48
`
49
 
2960 stevensc 50
const Spinner = ({ absolute = false }) => {
51
  if (absolute) {
52
    return (
53
      <Box
54
        sx={{
55
          position: 'absolute',
56
          width: '100%',
57
          height: '100%',
58
          display: 'grid',
59
          placeItems: 'center',
60
          zIndex: 50
61
        }}
62
      >
63
        <EllipsisContainer>
64
          <div className='bounce'></div>
65
          <div className='bounce'></div>
66
          <div className='bounce'></div>
67
        </EllipsisContainer>
68
      </Box>
69
    )
70
  }
71
 
5 stevensc 72
  return (
1799 stevensc 73
    <EllipsisContainer>
1770 stevensc 74
      <div className='bounce'></div>
75
      <div className='bounce'></div>
76
      <div className='bounce'></div>
1365 stevensc 77
    </EllipsisContainer>
5 stevensc 78
  )
79
}
80
 
81
export default Spinner