import clsx from 'clsx'; import type { InputProps } from '../../ui/input'; import { Input } from '../../ui/input'; import * as styles from './share.css'; export type AuthInputProps = InputProps & { label?: string; error?: boolean; errorHint?: string; withoutHint?: boolean; onEnter?: () => void; }; export const AuthInput = ({ label, error, errorHint, withoutHint = false, onEnter, className, ...inputProps }: AuthInputProps) => { return (
{label ? : null} { if (e.key === 'Enter') { onEnter?.(); } }} {...inputProps} /> {error && errorHint && !withoutHint ? (
{errorHint}
) : null}
); };