Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

O3-1294:User should be able to navigate back to username screen #449

Merged
merged 4 commits into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/apps/esm-login-app/src/login/login.component.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useState, useRef, useEffect, useCallback } from "react";
import styles from "../styles.scss";
import ArrowRight24 from "@carbon/icons-react/es/arrow--right/24";
import ArrowLeft16 from "@carbon/icons-react/es/arrow--left/16";
import {
Button,
InlineNotification,
Expand Down Expand Up @@ -148,6 +149,19 @@ const Login: React.FC<LoginProps> = ({ history, location, isLoginEnabled }) => {
onClick={() => setErrorMessage("")}
/>
)}
{showPassword ? (
<div style={{ width: "23rem" }}>
<Button
className={styles["back-button"]}
kind="ghost"
iconDescription="Back to username"
onClick={() => history.push("/login")}
>
<ArrowLeft16 style={{ marginRight: "1rem" }} />
Back
</Button>
</div>
) : null}
<Tile className={styles["login-card"]}>
<div className={styles["center"]}>{logo}</div>
<form onSubmit={handleSubmit} ref={formRef}>
Expand Down
8 changes: 8 additions & 0 deletions packages/apps/esm-login-app/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@
width: 18rem;
}

.back-button {
height: 3rem;

svg {
margin-right: 0.5rem;
}
}

.inputStyle {
@extend .label01;
width: 18rem;
Expand Down
1 change: 1 addition & 0 deletions packages/apps/esm-login-app/translations/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"back": "back",
"change": "Change",
"confirm": "Confirm",
"contactAdmin": "Contact the site administrator",
Expand Down