Auto Focus on email fields in auth screens (#923)

Fixes: #610 
Co-authored-by: Anshul <anshul@typito.com>
This commit is contained in:
Anshul Bansal 2020-10-07 12:37:16 +05:30 committed by GitHub
parent 8f62ac93a1
commit 776daa61ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,7 @@ type InputComponentProps = {
type?: InputType; type?: InputType;
intent?: Intent; intent?: Intent;
disabled?: boolean; disabled?: boolean;
autoFocus?: boolean;
}; };
const InputComponent = (props: InputComponentProps) => { const InputComponent = (props: InputComponentProps) => {
@ -28,6 +29,7 @@ const InputComponent = (props: InputComponentProps) => {
placeholder={props.placeholder} placeholder={props.placeholder}
type={props.type} type={props.type}
intent={props.intent as BlueprintIntent} intent={props.intent as BlueprintIntent}
autoFocus={props.autoFocus}
/> />
); );
}; };

View File

@ -32,6 +32,7 @@ type FormTextFieldProps = {
label?: string; label?: string;
intent?: Intent; intent?: Intent;
disabled?: boolean; disabled?: boolean;
autoFocus?: boolean;
}; };
const FormTextField = (props: FormTextFieldProps) => { const FormTextField = (props: FormTextFieldProps) => {

View File

@ -131,6 +131,7 @@ export const Login = (props: LoginFormProps) => {
name={LOGIN_FORM_EMAIL_FIELD_NAME} name={LOGIN_FORM_EMAIL_FIELD_NAME}
type="email" type="email"
placeholder={LOGIN_PAGE_EMAIL_INPUT_PLACEHOLDER} placeholder={LOGIN_PAGE_EMAIL_INPUT_PLACEHOLDER}
autoFocus
/> />
</FormGroup> </FormGroup>
<FormGroup <FormGroup

View File

@ -130,6 +130,7 @@ export const SignUp = (props: SignUpFormProps) => {
name="email" name="email"
type="email" type="email"
placeholder={SIGNUP_PAGE_EMAIL_INPUT_PLACEHOLDER} placeholder={SIGNUP_PAGE_EMAIL_INPUT_PLACEHOLDER}
autoFocus
/> />
</FormGroup> </FormGroup>
<FormGroup <FormGroup