diff --git a/src/components/ui/checkbox.tsx b/src/components/ui/checkbox.tsx new file mode 100644 index 0000000..e09674a --- /dev/null +++ b/src/components/ui/checkbox.tsx @@ -0,0 +1,21 @@ +import * as React from "react"; +import { cn } from "@/lib/utils"; + +export interface CheckboxProps extends Omit, "onChange"> { + onCheckedChange?: (checked: boolean) => void; +} + +export const Checkbox = React.forwardRef( + ({ className, onCheckedChange, ...props }, ref) => ( + onCheckedChange?.(e.target.checked)} + className={cn("h-4 w-4 rounded border-slate-300 accent-indigo-600", className)} + {...props} + /> + ) +); +Checkbox.displayName = "Checkbox"; + +export default Checkbox;