- setFocused(
- field.value?.length !== 0
- )}
- onFocus={() => setFocused( true )}
- disabled={loading}
- className={`transition-opacity ${
- !focused && "opacity-25"
- }`}
- minLength={
- schema.shape.password._def
- .options[ 0 ]
- .minLength as number
- }
- maxLength={
- schema.shape.password._def
- .options[ 0 ]
- .maxLength as number
- }
- spellCheck="false"
- placeholder="password"
- autoComplete="current-password"
- autoCapitalize="off"
- />
+
+
+ setFocused(
+ field.value
+ ?.length !== 0
+ )}
+ onFocus={() => setFocused( true )}
+ disabled={loading}
+ className={`transition-opacity ${
+ !focused && "opacity-25"
+ }`}
+ minLength={
+ schema.shape.password
+ ._def.options[ 0 ]
+ .minLength as number
+ }
+ maxLength={
+ schema.shape.password
+ ._def.options[ 0 ]
+ .maxLength as number
+ }
+ spellCheck="false"
+ placeholder="password"
+ autoComplete="current-password"
+ autoCapitalize="off"
+ />
+
+
+
+ {
+ setPasswordType(
+ passwordType
+ === "password"
+ ? "text"
+ : "password"
+ );
+ }}
+ >
+ {( passwordType
+ === "password" && (
+
+ ) ) || (
+
+ )}
+
+
+
+ Voir ou masquer le mot
+ de passe
+
+
+
+