refactor: 更新组件引用类型为 ComponentRef,以提高类型安全性

This commit is contained in:
2026-07-09 23:28:59 +08:00
parent 14d85e5265
commit f0c3d9c173
5 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import { Check } from 'lucide-react';
import { cn } from '@/lib/utils';
const Checkbox = React.forwardRef<
React.ElementRef<typeof CheckboxPrimitive.Root>,
React.ComponentRef<typeof CheckboxPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
>(({ className, ...props }, ref) => (
<CheckboxPrimitive.Root