From 69f6acbc4d31adaa48b7bb785f167be84939ea55 Mon Sep 17 00:00:00 2001 From: martylukyy <35452459+martylukyy@users.noreply.github.com> Date: Mon, 10 Apr 2023 14:30:29 +0200 Subject: [PATCH] fix(web): PasswordField eye icon alignment (#824) * keep eye icon inside PasswordField during onboarding * proper solution * removed redundant relative class --- web/src/components/inputs/input.tsx | 79 ++++++++++++++++------------- 1 file changed, 44 insertions(+), 35 deletions(-) diff --git a/web/src/components/inputs/input.tsx b/web/src/components/inputs/input.tsx index d52021c..367022e 100644 --- a/web/src/components/inputs/input.tsx +++ b/web/src/components/inputs/input.tsx @@ -247,14 +247,14 @@ export const TextArea = ({ ); interface PasswordFieldProps { - name: string; - label?: string; - placeholder?: string; - columns?: COL_WIDTHS; - autoComplete?: string; - defaultValue?: string; - help?: string; - required?: boolean; + name: string; + label?: string; + placeholder?: string; + columns?: COL_WIDTHS; + autoComplete?: string; + defaultValue?: string; + help?: string; + required?: boolean; } export const PasswordField = ({ @@ -280,35 +280,44 @@ export const PasswordField = ({ {label} {required && *} )} - - {({ - field, - meta - }: FieldProps) => ( -
- +
+ + {({ + field, + meta + }: FieldProps) => ( + <> +
+ -
- {!isVisible ?
+
+ {!isVisible ?
+
+ {help && ( +

{help}

+ )} - {help && ( -

{help}

- )} - - {meta.touched && meta.error && ( -

* {meta.error}

- )} -
- )} - + {meta.touched && meta.error && ( +

* {meta.error}

+ )} + + )} + +
); };