Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 690 | Rev 1365 | 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)`
5 stevensc 5
  width: 100%;
6
  height: 100%;
7
  display: grid;
8
  place-items: center;
9
  position: absolute;
690 stevensc 10
  top: 0;
11
  left: 0;
5 stevensc 12
  .lds-ellipsis {
13
    display: inline-block;
14
    position: relative;
15
    width: 80px;
16
    height: 80px;
17
  }
18
  .lds-ellipsis div {
19
    position: absolute;
20
    top: 33px;
21
    width: 13px;
22
    height: 13px;
23
    border-radius: 50%;
24
    background: #dfdfdf;
25
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
26
  }
27
  .lds-ellipsis div:nth-child(1) {
28
    left: 8px;
29
    animation: lds-ellipsis1 0.6s infinite;
30
  }
31
  .lds-ellipsis div:nth-child(2) {
32
    left: 8px;
33
    animation: lds-ellipsis2 0.6s infinite;
34
  }
35
  .lds-ellipsis div:nth-child(3) {
36
    left: 32px;
37
    animation: lds-ellipsis2 0.6s infinite;
38
  }
39
  .lds-ellipsis div:nth-child(4) {
40
    left: 56px;
41
    animation: lds-ellipsis3 0.6s infinite;
42
  }
43
  @keyframes lds-ellipsis1 {
44
    0% {
45
      transform: scale(0);
46
    }
47
    100% {
48
      transform: scale(1);
49
    }
50
  }
51
  @keyframes lds-ellipsis3 {
52
    0% {
53
      transform: scale(1);
54
    }
55
    100% {
56
      transform: scale(0);
57
    }
58
  }
59
  @keyframes lds-ellipsis2 {
60
    0% {
61
      transform: translate(0, 0);
62
    }
63
    100% {
64
      transform: translate(24px, 0);
65
    }
66
  }
67
`
68
 
1360 stevensc 69
const SpinnerContainer = styled(Box)`
70
  inset: 0;
71
  margin: auto;
72
  width: 80px;
73
  text-align: center;
74
  height: 80px;
75
  border-radius: 100px;
76
  background-color: #fff;
77
  line-height: 80px;
78
  border: 1px solid #e1e1e1;
79
  cursor: pointer;
80
`
81
 
82
const Spinner = ({ ...rest }) => {
5 stevensc 83
  return (
1360 stevensc 84
    <SpinnerContainer {...rest}>
85
      <EllipsisContainer>
690 stevensc 86
        <div className='lds-ellipsis'>
5 stevensc 87
          <div></div>
88
          <div></div>
89
          <div></div>
90
          <div></div>
91
        </div>
1360 stevensc 92
      </EllipsisContainer>
5 stevensc 93
    </SpinnerContainer>
94
  )
95
}
96
 
97
export default Spinner