From c1a3b9ae8a201481f6869066aa0f23bace91e643 Mon Sep 17 00:00:00 2001 From: Michael Zetterberg Date: Wed, 16 Oct 2024 12:05:08 +0200 Subject: [PATCH] fix: visibility toggle for new password disabled on edit profile --- .../Forms/Edit/Profile/FormContent/index.tsx | 4 ++- .../Form/NewPassword/index.tsx | 35 ++++++++++++------- .../Form/NewPassword/newPassword.ts | 1 + 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/components/Forms/Edit/Profile/FormContent/index.tsx b/components/Forms/Edit/Profile/FormContent/index.tsx index 3792cc85d..ad26f1087 100644 --- a/components/Forms/Edit/Profile/FormContent/index.tsx +++ b/components/Forms/Edit/Profile/FormContent/index.tsx @@ -73,7 +73,9 @@ export default function FormContent() { - + {/* visibilityToggleable set to false as feature is done for signup first */} + {/* likely we can remove the prop altogether once signup launches */} +
- + {visibilityToggleable ? ( + + ) : null}
{field.value ? (
diff --git a/components/TempDesignSystem/Form/NewPassword/newPassword.ts b/components/TempDesignSystem/Form/NewPassword/newPassword.ts index e6835cb58..8486a44ad 100644 --- a/components/TempDesignSystem/Form/NewPassword/newPassword.ts +++ b/components/TempDesignSystem/Form/NewPassword/newPassword.ts @@ -4,6 +4,7 @@ export interface NewPasswordProps extends React.InputHTMLAttributes { label?: string registerOptions?: RegisterOptions + visibilityToggleable?: boolean } export interface IconProps {