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