{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "spinner", "title": "Loader", "description": "A spinner component", "dependencies": [ "lucide-react" ], "files": [ { "path": "registry/cs/ui/spinner/spinner.tsx", "content": "import * as React from \"react\"\nimport { Loader2Icon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { CsBtnColor } from \"@/registry/cs/ui/button/button\"\n\nconst SPINNER_SIZES = {\n xs: \"size-3\",\n sm: \"size-4\",\n md: \"size-6\",\n lg: \"size-8\",\n xl: \"size-12\",\n}\n\nconst SPINNER_COLORS: Record = {\n primary: \"text-cs-primary\",\n secondary: \"text-cs-secondary\",\n grey: \"text-cs-grey\",\n dark: \"text-cs-dark\",\n red: \"text-cs-red\",\n blue: \"text-cs-blue\",\n green: \"text-cs-green\",\n yellow: \"text-cs-yellow\",\n orange: \"text-cs-orange\",\n}\n\nexport interface SpinnerProps extends React.ComponentProps<\"svg\"> {\n /** Spinner size. */\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"\n /** Spinner color. */\n color?: CsBtnColor\n}\n\nfunction Spinner({ className, size = \"md\", color = \"primary\", ...props }: SpinnerProps) {\n return (\n \n )\n}\n\nexport { Spinner, SPINNER_SIZES }\n", "type": "registry:ui" } ], "type": "registry:ui" }