From cd70128ff862c3dd2503df683543f747634683ae Mon Sep 17 00:00:00 2001 From: arjunyel Date: Fri, 9 Dec 2022 17:23:02 -0600 Subject: [PATCH] Add autocomplete to sign in/up forms --- frontend/components/basic/InputField.tsx | 9 ++++++++- frontend/pages/login.js | 3 +++ frontend/pages/settings/personal/[id].js | 6 ++++++ frontend/pages/signup.tsx | 5 +++++ frontend/pages/signupinvite.js | 4 ++++ 5 files changed, 26 insertions(+), 1 deletion(-) diff --git a/frontend/components/basic/InputField.tsx b/frontend/components/basic/InputField.tsx index 02bb8a8cc..139304ea6 100644 --- a/frontend/components/basic/InputField.tsx +++ b/frontend/components/basic/InputField.tsx @@ -21,7 +21,10 @@ interface InputFieldProps { onChangeHandler: (value: string) => void; } -const InputField = (props: InputFieldProps) => { +const InputField = ( + props: InputFieldProps & + Pick +) => { const [passwordVisible, setPasswordVisible] = useState(false); const router = useRouter(); @@ -43,6 +46,8 @@ const InputField = (props: InputFieldProps) => { className="bg-bunker-800 text-gray-400 border border-gray-600 rounded-md text-md p-2 w-full min-w-16 outline-none" name={props.name} readOnly + autoComplete={props.autoComplete} + id={props.id} /> ); @@ -88,6 +93,8 @@ const InputField = (props: InputFieldProps) => { } relative peer bg-bunker-800 rounded-md text-gray-400 text-md p-2 w-full min-w-16 outline-none focus:ring-4 duration-200`} name={props.name} spellCheck="false" + autoComplete={props.autoComplete} + id={props.id} /> {props.label?.includes("Password") && (