Spinner.tsx 635 B

123456789101112131415161718192021222324252627282930
  1. import { FC } from "react";
  2. type SpinnerProps = {
  3. size?: number;
  4. };
  5. const Spinner: FC<SpinnerProps> = ({ size = 20 }) => (
  6. <svg
  7. xmlns="http://www.w3.org/2000/svg"
  8. fill="none"
  9. viewBox="0 0 24 24"
  10. className="animate-spin"
  11. width={size}
  12. height={size}
  13. >
  14. <circle
  15. opacity=".25"
  16. cx="12"
  17. cy="12"
  18. r="10"
  19. stroke="currentColor"
  20. strokeWidth="4"
  21. />
  22. <path
  23. opacity=".75"
  24. fill="currentColor"
  25. d="M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
  26. />
  27. </svg>
  28. );
  29. export default Spinner;