import type { InputHTMLAttributes, ReactNode } from "react";

interface AuthFieldProps extends InputHTMLAttributes<HTMLInputElement> {
  icon: ReactNode;
}

export function AuthField({ icon, ...props }: AuthFieldProps): JSX.Element {
  return (
    <label className="z-login-field">
      <span className="z-login-field-icon" aria-hidden="true">
        {icon}
      </span>
      <input className="z-login-input" {...props} />
    </label>
  );
}
