Fix button ui when disabled (#8056)
This commit is contained in:
parent
773fcc3494
commit
10135091d1
5 changed files with 7 additions and 2 deletions
|
|
@ -183,6 +183,7 @@ const EditServerForm = ({
|
|||
<Button
|
||||
containerStyle={styles.connectButton}
|
||||
buttonStyle={styleButtonBackground}
|
||||
disabledStyle={styleButtonBackground}
|
||||
disabled={buttonDisabled}
|
||||
onPress={onUpdate}
|
||||
testID={saveButtonTestId}
|
||||
|
|
|
|||
|
|
@ -234,7 +234,8 @@ const ForgotPassword = ({componentId, serverUrl, theme}: Props) => {
|
|||
/>
|
||||
<Button
|
||||
testID='forgot.password.button'
|
||||
buttonStyle={[styles.returnButton, buttonBackgroundStyle(theme, 'lg', 'primary', email ? 'default' : 'disabled'), error ? styles.error : undefined]}
|
||||
buttonStyle={[styles.returnButton, buttonBackgroundStyle(theme, 'lg', 'primary', 'default'), error ? styles.error : undefined]}
|
||||
disabledStyle={[styles.returnButton, buttonBackgroundStyle(theme, 'lg', 'primary', 'disabled'), error ? styles.error : undefined]}
|
||||
disabled={!email}
|
||||
onPress={submitResetPassword}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -274,6 +274,7 @@ const LoginForm = ({config, extra, serverDisplayName, launchError, launchType, l
|
|||
disabled={buttonDisabled}
|
||||
onPress={onLogin}
|
||||
buttonStyle={[styles.loginButton, styleButtonBackground]}
|
||||
disabledStyle={[styles.loginButton, styleButtonBackground]}
|
||||
testID={signinButtonTestId}
|
||||
>
|
||||
{buttonIcon}
|
||||
|
|
|
|||
|
|
@ -236,7 +236,8 @@ const MFA = ({componentId, config, goToHome, license, loginId, password, serverD
|
|||
/>
|
||||
<Button
|
||||
testID='login_mfa.submit'
|
||||
buttonStyle={[styles.proceedButton, buttonBackgroundStyle(theme, 'lg', 'primary', token ? 'default' : 'disabled'), error ? styles.error : undefined]}
|
||||
buttonStyle={[styles.proceedButton, buttonBackgroundStyle(theme, 'lg', 'primary', 'default'), error ? styles.error : undefined]}
|
||||
disabledStyle={[styles.proceedButton, buttonBackgroundStyle(theme, 'lg', 'primary', 'disabled'), error ? styles.error : undefined]}
|
||||
disabled={!token}
|
||||
onPress={submit}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ const ServerForm = ({
|
|||
onPress={onConnect}
|
||||
testID={connectButtonTestId}
|
||||
buttonStyle={styleButtonBackground}
|
||||
disabledStyle={styleButtonBackground}
|
||||
>
|
||||
{buttonIcon}
|
||||
<FormattedText
|
||||
|
|
|
|||
Loading…
Reference in a new issue