demo: fix input box

This commit is contained in:
Bereket Engida
2024-10-18 18:38:17 +03:00
parent 34daae91ef
commit b4f7fa57f5

View File

@@ -17,8 +17,7 @@ const PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(
<div className="relative">
<Input
{...props}
type="text"
autoComplete="new-password"
type={showPassword ? "text" : "password"}
name="password_fake"
className={cn("hide-password-toggle pr-10", className)}
ref={ref}
@@ -31,7 +30,7 @@ const PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(
onClick={() => setShowPassword((prev) => !prev)}
disabled={disabled}
>
{!showPassword && !disabled ? (
{showPassword && !disabled ? (
<EyeIcon className="h-4 w-4" aria-hidden="true" />
) : (
<EyeOffIcon className="h-4 w-4" aria-hidden="true" />