Proyectos de Subversion LeadersLinked - SPA

Rev

Ir a la última revisión | | Ultima modificación | Ver Log |

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