Changes in Login-form hide/unhide button add secondary.

This commit is contained in:
Kartik Sharma 2025-09-17 17:09:56 +05:30
parent 6211f52e3a
commit 1c0e8655c4

View File

@ -146,7 +146,8 @@ const LoginPage = () => {
type={hidepass ? "password" : "text"} type={hidepass ? "password" : "text"}
autoComplete="new-password" autoComplete="new-password"
id="password" id="password"
className="form-control form-control-xl shadow-none" className={`form-control form-control-xl shadow-none ${errors.password ? "is-invalid" : ""
}`}
name="password" name="password"
{...register("password")} {...register("password")}
placeholder="••••••••••••" placeholder="••••••••••••"
@ -155,7 +156,7 @@ const LoginPage = () => {
<span className="input-group-text cursor-pointer border-start-0"> <span className="input-group-text cursor-pointer border-start-0">
<button <button
type="button" type="button"
className="btn btn-link p-0" className="btn btn-link-secondary p-0"
onClick={() => setHidepass(!hidepass)} onClick={() => setHidepass(!hidepass)}
> >
{hidepass ? ( {hidepass ? (
@ -166,7 +167,15 @@ const LoginPage = () => {
</button> </button>
</span> </span>
</div> </div>
{/* ✅ Error message */}
{errors.password && (
<div className="invalid-feedback text-start" style={{ fontSize: "12px" }}>
{errors.password.message}
</div> </div>
)}
</div>
{/* Remember Me + Forgot Password */} {/* Remember Me + Forgot Password */}
<div className="mb-3 d-flex justify-content-between align-items-center"> <div className="mb-3 d-flex justify-content-between align-items-center">