-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(passcodes): use new sign in ux for passcodes behind flag
- Loading branch information
Showing
17 changed files
with
250 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -331,3 +331,125 @@ export const WithErrorMessageSecurity = () => ( | |
WithErrorMessageVerification.story = { | ||
name: 'with error message - security', | ||
}; | ||
|
||
export const DefaultsSignIn = () => ( | ||
<PasscodeEmailSent passcodeAction="#" expiredPage="#" textType="signin" /> | ||
); | ||
DefaultsVerification.story = { | ||
name: 'with defaults - signin', | ||
}; | ||
|
||
export const ChangeEmailSignIn = () => ( | ||
<PasscodeEmailSent | ||
passcodeAction="#" | ||
expiredPage="#" | ||
changeEmailPage="#" | ||
textType="signin" | ||
/> | ||
); | ||
ChangeEmailVerification.story = { | ||
name: 'with changeEmailPage - signin', | ||
}; | ||
|
||
export const WithEmailSignIn = () => ( | ||
<PasscodeEmailSent | ||
passcodeAction="#" | ||
expiredPage="#" | ||
changeEmailPage="#" | ||
email="[email protected]" | ||
textType="signin" | ||
/> | ||
); | ||
WithEmailVerification.story = { | ||
name: 'with email - signin', | ||
}; | ||
|
||
export const WithPasscodeSignIn = () => ( | ||
<PasscodeEmailSent | ||
passcodeAction="#" | ||
expiredPage="#" | ||
changeEmailPage="#" | ||
email="[email protected]" | ||
passcode="123456" | ||
textType="signin" | ||
/> | ||
); | ||
WithPasscodeVerification.story = { | ||
name: 'with passcode - signin', | ||
}; | ||
|
||
export const WithPasscodeErrorSignIn = () => ( | ||
<PasscodeEmailSent | ||
shortRequestId="123e4567" | ||
passcodeAction="#" | ||
expiredPage="#" | ||
changeEmailPage="#" | ||
email="[email protected]" | ||
passcode="123456" | ||
fieldErrors={[ | ||
{ | ||
field: 'code', | ||
message: 'Invalid code', | ||
}, | ||
]} | ||
textType="signin" | ||
/> | ||
); | ||
WithPasscodeErrorVerification.story = { | ||
name: 'with passcode error - signin', | ||
}; | ||
|
||
export const WithRecaptchaErrorSignIn = () => ( | ||
<PasscodeEmailSent | ||
shortRequestId="123e4567" | ||
passcodeAction="#" | ||
expiredPage="#" | ||
changeEmailPage="#" | ||
email="[email protected]" | ||
recaptchaSiteKey="invalid-key" | ||
textType="signin" | ||
/> | ||
); | ||
WithRecaptchaErrorVerification.story = { | ||
name: 'with reCAPTCHA error - signin', | ||
}; | ||
|
||
export const WithSuccessMessageSignIn = () => ( | ||
<PasscodeEmailSent | ||
passcodeAction="#" | ||
expiredPage="#" | ||
showSuccess={true} | ||
textType="signin" | ||
/> | ||
); | ||
WithSuccessMessageVerification.story = { | ||
name: 'with success message - signin', | ||
}; | ||
|
||
export const WithErrorMessageSignIn = () => ( | ||
<PasscodeEmailSent | ||
shortRequestId="123e4567" | ||
passcodeAction="#" | ||
expiredPage="#" | ||
errorMessage="•⩊• UwU" | ||
textType="signin" | ||
/> | ||
); | ||
WithErrorMessageVerification.story = { | ||
name: 'with error message - signin', | ||
}; | ||
|
||
export const WithSignInWithPasswordOption = () => ( | ||
<PasscodeEmailSent | ||
passcodeAction="#" | ||
expiredPage="#" | ||
changeEmailPage="#" | ||
email="[email protected]" | ||
noAccountInfo | ||
showSignInWithPasswordOption | ||
textType="signin" | ||
/> | ||
); | ||
WithSignInWithPasswordOption.story = { | ||
name: 'with sign in with password option - signin', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,66 +126,38 @@ IsReauthenticate.story = { | |
name: 'showing /reauthenticate page', | ||
}; | ||
|
||
export const WithPasscodeSelectedDefaultPassword = (args: SignInProps) => ( | ||
<SignIn | ||
{...{ | ||
...args, | ||
defaultView: 'password', | ||
currentView: 'passcode', | ||
usePasscodeSignIn: true, | ||
}} | ||
/> | ||
export const SignInWithPasscode = (args: SignInProps) => ( | ||
<SignIn {...{ ...args, usePasscodeSignIn: true }} /> | ||
); | ||
WithPasscodeSelectedDefaultPassword.story = { | ||
name: 'with passcode checkbox checked', | ||
SignInWithPasscode.story = { | ||
name: 'sign in with passcode', | ||
}; | ||
|
||
export const WithPasscodeSelectedDefaultPasswordError = (args: SignInProps) => ( | ||
export const SignInWithPasscodeError = (args: SignInProps) => ( | ||
<SignIn | ||
{...{ | ||
...args, | ||
defaultView: 'password', | ||
currentView: 'passcode', | ||
usePasscodeSignIn: true, | ||
pageError: SignInErrors.PASSCODE_EXPIRED, | ||
}} | ||
/> | ||
); | ||
WithPasscodeSelectedDefaultPassword.story = { | ||
name: 'with passcode checkbox checked', | ||
SignInWithPasscodeError.story = { | ||
name: 'sign in with passcode error', | ||
}; | ||
|
||
export const WithPasscodeSelectedDefaultPasscode = (args: SignInProps) => ( | ||
<SignIn {...{ ...args, defaultView: 'passcode', usePasscodeSignIn: true }} /> | ||
); | ||
WithPasscodeSelectedDefaultPasscode.story = { | ||
name: 'with passcode checkbox checked', | ||
}; | ||
|
||
export const WithPasscodeSelectedDefaultPasscodeError = (args: SignInProps) => ( | ||
<SignIn | ||
{...{ | ||
...args, | ||
defaultView: 'passcode', | ||
usePasscodeSignIn: true, | ||
pageError: SignInErrors.PASSCODE_EXPIRED, | ||
}} | ||
/> | ||
export const NoSocialButtons = (args: SignInProps) => ( | ||
<SignIn {...{ ...args, hideSocialButtons: true }} /> | ||
); | ||
WithPasscodeSelectedDefaultPasscodeError.story = { | ||
name: 'with passcode checkbox checked', | ||
NoSocialButtons.story = { | ||
name: 'no social buttons', | ||
}; | ||
|
||
export const WithPasswordSelectedDefaultPasscode = (args: SignInProps) => ( | ||
export const NoSocialButtonsEmail = (args: SignInProps) => ( | ||
<SignIn | ||
{...{ | ||
...args, | ||
defaultView: 'passcode', | ||
currentView: 'password', | ||
usePasscodeSignIn: true, | ||
}} | ||
{...{ ...args, hideSocialButtons: true, email: '[email protected]' }} | ||
/> | ||
); | ||
WithPasswordSelectedDefaultPasscode.story = { | ||
name: 'with password checkbox checked', | ||
NoSocialButtonsEmail.story = { | ||
name: 'no social buttons with email', | ||
}; |
Oops, something went wrong.