{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button",
  "type": "registry:ui",
  "title": "Button",
  "author": "@mrzachnugent",
  "description": "Displays a button or a component that looks like a button.",
  "registryDependencies": [
    "https://reactnativereusables.com/r/nativewind/text.json"
  ],
  "files": [
    {
      "path": "./node_modules/@rnr/registry/src/nativewind/components/ui/button.tsx",
      "content": "import { TextClassContext } from '@/registry/nativewind/components/ui/text';\nimport { cn } from '@/registry/nativewind/lib/utils';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Platform, Pressable } from 'react-native';\n\nconst buttonVariants = cva(\n  cn(\n    'group shrink-0 flex-row items-center justify-center gap-2 rounded-md shadow-none',\n    Platform.select({\n      web: \"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap outline-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n    })\n  ),\n  {\n    variants: {\n      variant: {\n        default: cn(\n          'bg-primary active:bg-primary/90 shadow-sm shadow-black/5',\n          Platform.select({ web: 'hover:bg-primary/90' })\n        ),\n        destructive: cn(\n          'bg-destructive active:bg-destructive/90 dark:bg-destructive/60 shadow-sm shadow-black/5',\n          Platform.select({\n            web: 'hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40',\n          })\n        ),\n        outline: cn(\n          'border-border bg-background active:bg-accent dark:bg-input/30 dark:border-input dark:active:bg-input/50 border shadow-sm shadow-black/5',\n          Platform.select({\n            web: 'hover:bg-accent dark:hover:bg-input/50',\n          })\n        ),\n        secondary: cn(\n          'bg-secondary active:bg-secondary/80 shadow-sm shadow-black/5',\n          Platform.select({ web: 'hover:bg-secondary/80' })\n        ),\n        ghost: cn(\n          'active:bg-accent dark:active:bg-accent/50',\n          Platform.select({ web: 'hover:bg-accent dark:hover:bg-accent/50' })\n        ),\n        link: '',\n      },\n      size: {\n        default: cn('h-10 px-4 py-2 sm:h-9', Platform.select({ web: 'has-[>svg]:px-3' })),\n        sm: cn('h-9 gap-1.5 rounded-md px-3 sm:h-8', Platform.select({ web: 'has-[>svg]:px-2.5' })),\n        lg: cn('h-11 rounded-md px-6 sm:h-10', Platform.select({ web: 'has-[>svg]:px-4' })),\n        icon: 'h-10 w-10 sm:h-9 sm:w-9',\n      },\n    },\n    defaultVariants: {\n      variant: 'default',\n      size: 'default',\n    },\n  }\n);\n\nconst buttonTextVariants = cva(\n  cn(\n    'text-foreground text-sm font-medium',\n    Platform.select({ web: 'pointer-events-none transition-colors' })\n  ),\n  {\n    variants: {\n      variant: {\n        default: 'text-primary-foreground',\n        destructive: 'text-white',\n        outline: cn(\n          'group-active:text-accent-foreground',\n          Platform.select({ web: 'group-hover:text-accent-foreground' })\n        ),\n        secondary: 'text-secondary-foreground',\n        ghost: 'group-active:text-accent-foreground',\n        link: cn(\n          'text-primary group-active:underline',\n          Platform.select({ web: 'underline-offset-4 hover:underline group-hover:underline' })\n        ),\n      },\n      size: {\n        default: '',\n        sm: '',\n        lg: '',\n        icon: '',\n      },\n    },\n    defaultVariants: {\n      variant: 'default',\n      size: 'default',\n    },\n  }\n);\n\ntype ButtonProps = React.ComponentProps<typeof Pressable> & React.RefAttributes<typeof Pressable> & VariantProps<typeof buttonVariants>;\n\nfunction Button({ className, variant, size, ...props }: ButtonProps) {\n  return (\n    <TextClassContext.Provider value={buttonTextVariants({ variant, size })}>\n      <Pressable\n        className={cn(props.disabled && 'opacity-50', buttonVariants({ variant, size }), className)}\n        role=\"button\"\n        {...props}\n      />\n    </TextClassContext.Provider>\n  );\n}\n\nexport { Button, buttonTextVariants, buttonVariants };\nexport type { ButtonProps };\n",
      "type": "registry:ui"
    }
  ]
}