import { InputHTMLAttributes } from "react";

interface AuthFormFieldProps extends InputHTMLAttributes<HTMLInputElement> {
  label: string;
  type?: string;
}

export function AuthFormField({ label, type = "text", ...props }: AuthFormFieldProps) {
  return (
    <div className="flex flex-col text-left">
      <label className="mb-2 font-semibold text-[#2f5d4b]">{label}</label>
      <input
        type={type}
        className="p-3 rounded-xl border border-[#cfded7] focus:outline-none focus:border-[#2f7d5f] focus:ring-2 focus:ring-[#2f7d5f]/20 transition"
        {...props}
      />
    </div>
  );
}