Download client/src/components/ui/Checkbox.tsx from Zhitomir/chat: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/spaces/Zhitomir/chat/resolve/main/client/src/components/ui/Checkbox.tsx
- Command line
-
hf download hf://spaces/Zhitomir/chat/client/src/components/ui/Checkbox.tsx
-
curl -L -o Checkbox.tsx https://huggingface.co/spaces/Zhitomir/chat/resolve/main/client/src/components/ui/Checkbox.tsx
1.01 kB
| import * as React from 'react'; | |
| import * as CheckboxPrimitive from '@radix-ui/react-checkbox'; | |
| import { Check } from 'lucide-react'; | |
| import { cn } from '../../utils'; | |
| const Checkbox = React.forwardRef< | |
| React.ElementRef<typeof CheckboxPrimitive.Root>, | |
| React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> | |
| >(({ className = '', ...props }, ref) => ( | |
| <CheckboxPrimitive.Root | |
| ref={ref} | |
| className={cn( | |
| 'peer h-4 w-4 shrink-0 rounded-sm border border-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-500 dark:text-gray-50 dark:focus:ring-gray-400 dark:focus:ring-offset-gray-900', | |
| className, | |
| )} | |
| {...props} | |
| > | |
| <CheckboxPrimitive.Indicator className={cn('flex items-center justify-center')}> | |
| <Check className="h-4 w-4" /> | |
| </CheckboxPrimitive.Indicator> | |
| </CheckboxPrimitive.Root> | |
| )); | |
| Checkbox.displayName = CheckboxPrimitive.Root.displayName; | |
| export { Checkbox }; | |