Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
1import { cva, type VariantProps } from "class-variance-authority";
2import { memo } from "react";
3import cn from "@/helpers/cn";
4
5const spinnerVariants = cva("", {
6 defaultVariants: { size: "md" },
7 variants: { size: { md: "size-7", sm: "size-5", xs: "size-4" } }
8});
9
10interface SpinnerProps extends VariantProps<typeof spinnerVariants> {
11 className?: string;
12}
13
14const Spinner = ({ className, size }: SpinnerProps) => {
15 return (
16 <svg
17 aria-hidden="true"
18 className={cn(spinnerVariants({ size }), className)}
19 fill="currentColor"
20 viewBox="0 0 24 24"
21 xmlns="http://www.w3.org/2000/svg"
22 >
23 <path
24 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"
25 opacity=".3"
26 />
27 <path d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z">
28 <animateTransform
29 attributeName="transform"
30 dur="0.3s"
31 repeatCount="indefinite"
32 type="rotate"
33 values="0 12 12;360 12 12"
34 />
35 </path>
36 </svg>
37 );
38};
39
40export default memo(Spinner);