mirror of
https://bitbucket.org/Mattrixwv/mattrixwvreactcomponents.git
synced 2025-12-06 13:43:59 -05:00
68 lines
1.1 KiB
TypeScript
68 lines
1.1 KiB
TypeScript
import type { LoadingDotsProps } from "$/types/Loading";
|
|
|
|
|
|
export default function PulsingDots({
|
|
width,
|
|
height,
|
|
className,
|
|
animationDuration = 0.75,
|
|
stroke,
|
|
fill
|
|
}: LoadingDotsProps){
|
|
//https://github.com/n3r4zzurr0/svg-spinners/blob/main/svg-smil/3-dots-scale-middle.svg
|
|
return (
|
|
<svg
|
|
width={width}
|
|
height={height}
|
|
viewBox="0 0 24 24"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<circle
|
|
cx="4"
|
|
cy="12"
|
|
r="1.5"
|
|
className={className}
|
|
stroke={stroke}
|
|
fill={fill}
|
|
>
|
|
<animate
|
|
attributeName="r"
|
|
dur={animationDuration}
|
|
values="1.5;3;1.5"
|
|
repeatCount="indefinite"
|
|
/>
|
|
</circle>
|
|
<circle
|
|
cx="12"
|
|
cy="12"
|
|
r="3"
|
|
className={className}
|
|
stroke={stroke}
|
|
fill={fill}
|
|
>
|
|
<animate
|
|
attributeName="r"
|
|
dur={animationDuration}
|
|
values="3;1.5;3"
|
|
repeatCount="indefinite"
|
|
/>
|
|
</circle>
|
|
<circle
|
|
cx="20"
|
|
cy="12"
|
|
r="1.5"
|
|
className={className}
|
|
stroke={stroke}
|
|
fill={fill}
|
|
>
|
|
<animate
|
|
attributeName="r"
|
|
dur={animationDuration}
|
|
values="1.5;3;1.5"
|
|
repeatCount="indefinite"
|
|
/>
|
|
</circle>
|
|
</svg>
|
|
);
|
|
}
|