Files
MattrixwvReactComponents/lib/component/loading/spinner/ThreeQuarterSpinner.tsx

46 lines
1.1 KiB
TypeScript

import type { LoadingSpinnerProps } from "$/types/Loading";
export default function ThreeQuarterSpinner({
width,
height,
animationDuration = 1,
className,
stroke,
fill,
trackClassName = "fill-transparent",
trackStroke,
trackFill
}: LoadingSpinnerProps){
//https://github.com/n3r4zzurr0/svg-spinners/blob/main/svg-smil/270-ring-with-bg.svg
return (
<svg
width={width}
height={height}
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z"
className={trackClassName}
stroke={trackStroke}
fill={trackFill}
/>
<path
d="M10.72,19.9a8,8,0,0,1-6.5-9.79A7.77,7.77,0,0,1,10.4,4.16a8,8,0,0,1,9.49,6.52A1.54,1.54,0,0,0,21.38,12h.13a1.37,1.37,0,0,0,1.38-1.54,11,11,0,1,0-12.7,12.39A1.54,1.54,0,0,0,12,21.34h0A1.47,1.47,0,0,0,10.72,19.9Z"
className={className}
stroke={stroke}
fill={fill}
>
<animateTransform
attributeName="transform"
type="rotate"
dur={animationDuration}
values="0 12 12;360 12 12"
repeatCount="indefinite"
/>
</path>
</svg>
);
}