Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

spinner.tsx

17 lines487 Bytes

1import { LoaderCircleIcon } from "lucide-react";
2import { observeVisibleAnimation } from "~/lib/visibleAnimation";
3import { cn } from "~/lib/utils";
4​
5function Spinner({ className, ...props }: React.ComponentPropsWithoutRef<typeof LoaderCircleIcon>) {
6 return (
7 <LoaderCircleIcon
8 aria-label="Loading"
9 ref={observeVisibleAnimation}
10 className={cn("motion-safe:visible-animate-spin", className)}
11 role="status"
12 {...props}
13 />
14 );
16​
17export { Spinner };