Skip to content

Commit

Permalink
fix(app-general): update autocomplete case
Browse files Browse the repository at this point in the history
  • Loading branch information
rams23 committed Feb 26, 2021
1 parent 75dc7e6 commit a553929
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type Props = {
errorMessage?: string | null;
onForgotPassword?: () => void;
forgotPasswordLabel?: string;
autocomplete?: React.ComponentProps<typeof Input>['autocomplete'];
autoComplete?: React.ComponentProps<typeof Input>['autocomplete'];
tabIndex?: React.ComponentProps<typeof Input>['tabIndex'];
};

Expand All @@ -38,7 +38,7 @@ const PasswordInput = React.forwardRef<HTMLInputElement, Props>(
forgotPasswordLabel,
onForgotPassword,
tabIndex,
autocomplete,
autoComplete,
},
ref,
) => {
Expand All @@ -64,7 +64,7 @@ const PasswordInput = React.forwardRef<HTMLInputElement, Props>(
<Input
ref={ref}
variant={!!errorMessage ? 'defaultError' : 'default'}
autocomplete={autocomplete}
autoComplete={autoComplete}
iconRight={
<IconButton variant="clearSmall" onClick={toggleType} tabIndex={-1}>
<StyledIcon variant="small">{type === 'password' ? <EyeIcon /> : <HideIcon />}</StyledIcon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Props = {
type?: string;
disabled?: boolean;
tabIndex?: React.ComponentProps<typeof Input>['tabIndex'];
autocomplete?: React.ComponentProps<typeof Input>['autocomplete'];
autoComplete?: React.ComponentProps<typeof Input>['autocomplete'];
};

const TextInput = React.forwardRef<HTMLInputElement, Props>(
Expand All @@ -33,7 +33,7 @@ const TextInput = React.forwardRef<HTMLInputElement, Props>(
type = 'text',
disabled,
tabIndex,
autocomplete,
autoComplete,
},
ref,
) => {
Expand All @@ -58,7 +58,7 @@ const TextInput = React.forwardRef<HTMLInputElement, Props>(
id={name}
onChange={onChange}
tabIndex={tabIndex}
autocomplete={autocomplete}
autoComplete={autoComplete}
/>
{errorMessage ? <ErrorMessage message={errorMessage} /> : null}
</InputContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type Props = {
CustomInput?: React.ComponentType<React.ComponentProps<typeof TextInput>>;
disabled?: boolean;
tabIndex?: React.ComponentProps<typeof TextInput>['tabIndex'];
autocomplete?: React.ComponentProps<typeof TextInput>['autocomplete'];
autoComplete?: React.ComponentProps<typeof TextInput>['autoComplete'];
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const ForgotPassword: React.FC<Props> = () => {
name="email"
label={t('forgotPassword.form.email.label')}
placeholder={t('forgotPassword.form.email.placeholder')}
autocomplete="email"
autoComplete="email"
/>
<Box textAlign="center" mt={5}>
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const ResetPassword: React.FC<Props> = () => {
placeholder={t('resetPassword.form.password.placeholder')}
labelDetails={t('auth.errors.passwordRequirements')}
disabled={resetLoading || verifyActionCodeLoading}
autocomplete="new-password"
autoComplete="new-password"
/>
<Box mt={3}>
<FormTextField
Expand All @@ -88,7 +88,7 @@ const ResetPassword: React.FC<Props> = () => {
label={t('resetPassword.form.repeatPassword.label')}
placeholder={t('resetPassword.form.repeatPassword.placeholder')}
disabled={resetLoading || verifyActionCodeLoading}
autocomplete="new-password"
autoComplete="new-password"
/>
</Box>
<Box textAlign="center" mt={5}>
Expand Down
4 changes: 2 additions & 2 deletions packages/game-app/src/login/components/Login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ const Login: React.FC<Props> = () => {
name="email"
label={t('login.form.email.label')}
placeholder={t('login.form.email.placeholder')}
autocomplete="email"
autoComplete="email"
/>
<Box mt={3}>
<FormTextField
CustomInput={PasswordInput}
name="password"
label={t('login.form.password.label')}
placeholder={t('login.form.password.placeholder')}
autocomplete="current-password"
autoComplete="current-password"
{...passwordProps}
/>
</Box>
Expand Down
10 changes: 5 additions & 5 deletions packages/game-app/src/signup/components/Signup/Signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ const Signup: React.FC<Props> = () => {
name="firstName"
label={t('signup.form.firstName.label')}
placeholder={t('signup.form.firstName.placeholder')}
autocomplete="given-name"
autoComplete="given-name"
/>
</Box>
<Box flex={1} ml={3}>
<FormTextField
name="lastName"
label={t('signup.form.lastName.label')}
placeholder={t('signup.form.lastName.placeholder')}
autocomplete="family-name"
autoComplete="family-name"
/>
</Box>
</Box>
Expand All @@ -94,7 +94,7 @@ const Signup: React.FC<Props> = () => {
name="email"
label={t('signup.form.email.label')}
placeholder={t('signup.form.email.placeholder')}
autocomplete="email"
autoComplete="email"
/>
</Box>
<Box mt={3} display="flex" flexDirection="row">
Expand All @@ -105,7 +105,7 @@ const Signup: React.FC<Props> = () => {
label={t('signup.form.password.label')}
labelDetails={t('auth.errors.passwordRequirements')}
placeholder={t('signup.form.password.placeholder')}
autocomplete="new-password"
autoComplete="new-password"
/>
</Box>
<Box flex={1} ml={3}>
Expand All @@ -114,7 +114,7 @@ const Signup: React.FC<Props> = () => {
name="repeatPassword"
label={t('signup.form.repeatPassword.label')}
placeholder={t('signup.form.repeatPassword.placeholder')}
autocomplete="new-password"
autoComplete="new-password"
/>
</Box>
</Box>
Expand Down

0 comments on commit a553929

Please sign in to comment.