Spinner.tsx 964 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import React from "react";
  2. import styled, { keyframes } from "styled-components";
  3. const spin = keyframes`
  4. from {
  5. transform: rotate(0deg);
  6. }
  7. to {
  8. transform: rotate(360deg);
  9. }
  10. `;
  11. const Svg = styled.svg`
  12. animation: ${spin} 1s linear infinite;
  13. `
  14. function Spinner() {
  15. return (
  16. <Svg
  17. xmlns="http://www.w3.org/2000/svg"
  18. width="24"
  19. height="24"
  20. fill="none"
  21. stroke="currentColor"
  22. strokeLinecap="round"
  23. strokeLinejoin="round"
  24. strokeWidth="2"
  25. className="feather feather-loader"
  26. viewBox="0 0 24 24"
  27. >
  28. <path d="M12 2L12 6"></path>
  29. <path d="M12 18L12 22"></path>
  30. <path d="M4.93 4.93L7.76 7.76"></path>
  31. <path d="M16.24 16.24L19.07 19.07"></path>
  32. <path d="M2 12L6 12"></path>
  33. <path d="M18 12L22 12"></path>
  34. <path d="M4.93 19.07L7.76 16.24"></path>
  35. <path d="M16.24 7.76L19.07 4.93"></path>
  36. </Svg>
  37. );
  38. }
  39. export default React.memo(Spinner);