{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button",
  "type": "registry:ui",
  "title": "Button",
  "description": "A button component",
  "dependencies": [
    "@kobalte/core",
    "class-variance-authority",
    "solid-js"
  ],
  "files": [
    {
      "path": "src/registry/ui/button.tsx",
      "content": "import type { JSX, ValidComponent } from \"solid-js\"\nimport { splitProps } from \"solid-js\"\n\nimport * as ButtonPrimitive from \"@kobalte/core/button\"\nimport type { PolymorphicProps } from \"@kobalte/core/polymorphic\"\nimport type { VariantProps } from \"class-variance-authority\"\nimport { cva } from \"class-variance-authority\"\n\nimport { cn } from \"~/lib/utils\"\n\nconst buttonVariants = cva(\n  \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n        destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n        outline: \"border border-input hover:bg-accent hover:text-accent-foreground\",\n        secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n        ghost: \"hover:bg-accent hover:text-accent-foreground\",\n        link: \"text-primary underline-offset-4 hover:underline\"\n      },\n      size: {\n        default: \"h-10 px-4 py-2\",\n        sm: \"h-9 px-3 text-xs\",\n        lg: \"h-11 px-8\",\n        icon: \"size-10\"\n      }\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\"\n    }\n  }\n)\n\ntype ButtonProps<T extends ValidComponent = \"button\"> = ButtonPrimitive.ButtonRootProps<T> &\n  VariantProps<typeof buttonVariants> & { class?: string | undefined; children?: JSX.Element }\n\nconst Button = <T extends ValidComponent = \"button\">(\n  props: PolymorphicProps<T, ButtonProps<T>>\n) => {\n  const [local, others] = splitProps(props as ButtonProps, [\"variant\", \"size\", \"class\"])\n  return (\n    <ButtonPrimitive.Root\n      class={cn(buttonVariants({ variant: local.variant, size: local.size }), local.class)}\n      {...others}\n    />\n  )\n}\n\nexport { Button, buttonVariants }\nexport type { ButtonProps }\n",
      "type": "registry:ui"
    }
  ]
}