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

View File

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

View File

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

View File

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