Skip to content

Commit

Permalink
feat(apps): make registration back button always available
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikssonJoakim committed Feb 13, 2024
1 parent 39b4eec commit 39ae50d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
25 changes: 19 additions & 6 deletions src/apps/react-app/pages/registration/registration.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,30 @@
@include grid-item($colStart: 1, $colEnd: -1, $rowStart: auto, $rowEnd: auto);
@include twelve-column-layout;

.react-app-registration-page-form {
@include columns-with-gap($gap: 10px);
.react-app-registration-page-form-container {
@include grid-item($colStart: 6, $colEnd: -6, $rowStart: auto, $rowEnd: auto);
@include grid-container($colsNb: 2, $colGutter: 16px);
align-self: center;

@include use-breakpoints(('mobile')) {
@include grid-item($colStart: 3, $colEnd: -3, $rowStart: auto, $rowEnd: auto);
@include use-breakpoints(('mobile', 'tablet')) {
@include columns-with-gap($gap: 20px);
}

@include use-breakpoints(('tablet')) {
@include grid-item($colStart: 4, $colEnd: -4, $rowStart: auto, $rowEnd: auto);
.react-app-registration-page-form {
@include columns-with-gap($gap: 10px);

@include use-breakpoints(('mobile')) {
@include grid-item($colStart: 3, $colEnd: -3, $rowStart: auto, $rowEnd: auto);
}

@include use-breakpoints(('tablet')) {
@include grid-item($colStart: 4, $colEnd: -4, $rowStart: auto, $rowEnd: auto);
}
}

.react-app-registration-page-button-back-wrapper {
align-self: center;
justify-self: center;
}
}
}
6 changes: 4 additions & 2 deletions src/apps/react-app/pages/registration/registration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const Registration: FC = () => {

return (
<div className="react-app-registration-page-main">
<div className="react-app-registration-page-form">
<div className="react-app-registration-page-form-container">
<Formik
initialValues={initialValues}
onSubmit={handleSubmit}
Expand Down Expand Up @@ -118,11 +118,13 @@ export const Registration: FC = () => {
<button className="react-app-registration-page-form-submit-button" type="submit">
Submit
</button>
<Button label="Back" onClick={handleBack} />
</Form>
)
}
</Formik>
<div className="react-app-registration-page-button-back-wrapper">
<Button label="Back" onClick={handleBack} />
</div>
</div>
</div>
)
Expand Down

0 comments on commit 39ae50d

Please sign in to comment.