Skip to content

Commit

Permalink
Better option signup form
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixMalfait committed Nov 5, 2024
1 parent 3da6919 commit 3523c26
Showing 1 changed file with 13 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,7 @@ export const SignInUpForm = () => {
Icon={() => <IconGoogle size={theme.icon.size.lg} />}
title="Continue with Google"
onClick={signInWithGoogle}
variant={
signInUpStep === SignInUpStep.Init
? undefined
: 'secondary'
}
variant="secondary"
fullWidth
/>
<HorizontalSeparator visible={false} />
Expand All @@ -182,11 +178,7 @@ export const SignInUpForm = () => {
Icon={() => <IconMicrosoft size={theme.icon.size.lg} />}
title="Continue with Microsoft"
onClick={signInWithMicrosoft}
variant={
signInUpStep === SignInUpStep.Init
? undefined
: 'secondary'
}
variant="secondary"
fullWidth
/>
<HorizontalSeparator visible={false} />
Expand All @@ -196,11 +188,7 @@ export const SignInUpForm = () => {
<>
<MainButton
Icon={() => <IconKey size={theme.icon.size.lg} />}
variant={
signInUpStep === SignInUpStep.Init
? undefined
: 'secondary'
}
variant="secondary"
title={
signInUpStep === SignInUpStep.SSOEmail
? 'Continue with email'
Expand All @@ -213,11 +201,10 @@ export const SignInUpForm = () => {
</>
)}

{signInUpStep !== SignInUpStep.Init && (authProviders.google ||
authProviders.microsoft ||
authProviders.sso) &&(
<HorizontalSeparator visible />
)}
{signInUpStep !== SignInUpStep.Init &&
(authProviders.google ||
authProviders.microsoft ||
authProviders.sso) && <HorizontalSeparator visible />}

{authProviders.password &&
(signInUpStep === SignInUpStep.Password ||
Expand Down Expand Up @@ -311,7 +298,9 @@ export const SignInUpForm = () => {
<MainButton
title={buttonTitle}
type="submit"
variant="primary"
variant={
signInUpStep === SignInUpStep.Init ? 'secondary' : 'primary'
}
onClick={async () => {
if (signInUpStep === SignInUpStep.Init) {
continueWithEmail();
Expand All @@ -331,9 +320,9 @@ export const SignInUpForm = () => {
Icon={() =>
form.formState.isSubmitting ? (
<Loader />
) : (
signInUpStep === SignInUpStep.Init ? <IconMail size={theme.icon.size.lg} /> : null
)
) : signInUpStep === SignInUpStep.Init ? (
<IconMail size={theme.icon.size.lg} />
) : null
}
disabled={isSubmitButtonDisabled}
fullWidth
Expand Down

0 comments on commit 3523c26

Please sign in to comment.