import type { InputHTMLAttributes, ReactNode } from "react"; import { checkboxClass } from "@/lib/ui/variants"; interface CheckboxProps extends Omit, "type"> { label?: ReactNode; } // 勾选框:无 label 时只渲染受控原生 input(供已有 /布局包裹的调用点直接替换); // 有 label 时自带 包裹,保留原生键盘/读屏语义。 export function Checkbox({ label, className, ...props }: CheckboxProps) { const input = ; if (!label) return input; return ( {input} {label} ); }