base-loading.tsx 862 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import { styled } from "@mui/material";
  2. const Loading = styled("div")`
  3. position: relative;
  4. display: flex;
  5. height: 100%;
  6. min-height: 18px;
  7. box-sizing: border-box;
  8. align-items: center;
  9. & > div {
  10. box-sizing: border-box;
  11. width: 6px;
  12. height: 6px;
  13. margin: 2px;
  14. border-radius: 100%;
  15. animation: loading 0.7s -0.15s infinite linear;
  16. }
  17. & > div:nth-child(2n-1) {
  18. animation-delay: -0.5s;
  19. }
  20. @keyframes loading {
  21. 50% {
  22. opacity: 0.2;
  23. transform: scale(0.75);
  24. }
  25. 100% {
  26. opacity: 1;
  27. transform: scale(1);
  28. }
  29. }
  30. `;
  31. const LoadingItem = styled("div")(({ theme }) => ({
  32. background: theme.palette.text.secondary,
  33. }));
  34. const BaseLoading = () => {
  35. return (
  36. <Loading>
  37. <LoadingItem />
  38. <LoadingItem />
  39. <LoadingItem />
  40. </Loading>
  41. );
  42. };
  43. export default BaseLoading;