import { InputHTMLAttributes, forwardRef } from "react"; import { cn } from "../lib/cn"; interface Props extends InputHTMLAttributes { label?: string; } export const Input = forwardRef(function Input( { label, className, id, ...rest }, ref, ) { const inputId = id ?? label?.toLowerCase().replace(/\s+/g, "-"); return (
{label && ( )}
); });