Rev 3452 | AutorÃa | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react';
import { Box, styled } from '@mui/material';
const EllipsisContainer = styled(Box)`
margin: 0 auto;
width: 80px;
height: 80px;
border-radius: 100px;
background-color: #fff;
border: 1px solid #e1e1e1;
display: flex;
align-items: center;
justify-content: space-evenly;
.bounce {
width: 13px;
height: 13px;
background-color: #b9b9b9;
border-radius: 100%;
display: inline-block;
transform-origin: center;
-webkit-animation: bounce_delay 1.4s infinite ease-in-out both;
animation: bounce_delay 1.4s infinite ease-in-out both;
}
.bounce:nth-of-type(1) {
-webkit-animation-delay: -0.32s;
animation-delay: -0.32s;
}
.bounce:nth-of-type(2) {
-webkit-animation-delay: -0.16s;
animation-delay: -0.16s;
}
.bounce:nth-of-type(3) {
-webkit-animation-delay: 0;
animation-delay: 0;
}
@keyframes bounce_delay {
0%,
80%,
100% {
-webkit-transform: scale(0);
transform: scale(0);
}
40% {
-webkit-transform: scale(1);
transform: scale(1);
}
}
`;
export function Spinner({ absolute = false }) {
if (absolute) {
return (
<Box
sx={{
position: 'absolute',
width: '100%',
height: '100%',
display: 'grid',
placeItems: 'center',
top: 0,
lef: 0,
zIndex: 50
}}
>
<EllipsisContainer>
<div className='bounce'></div>
<div className='bounce'></div>
<div className='bounce'></div>
</EllipsisContainer>
</Box>
);
}
return (
<EllipsisContainer>
<div className='bounce'></div>
<div className='bounce'></div>
<div className='bounce'></div>
</EllipsisContainer>
);
}