Skip to content

Commit

Permalink
Merge pull request #67 from microsoft/anpethel/workingOnResultButtons
Browse files Browse the repository at this point in the history
centering buttons on result page for mobile
  • Loading branch information
andrewpethel authored Sep 24, 2024
2 parents 1572a02 + ee5e30d commit f2a6634
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 21 deletions.
4 changes: 4 additions & 0 deletions Client/src/components/Form/Button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,8 @@
background-color: white;
border: 2px solid $primary-color;
color: $primary-color;
display: inline-block;
justify-content: space-between;
min-width: 200px;
text-align: center;
}
10 changes: 10 additions & 0 deletions Client/src/components/Layout/Layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@
height: 100%;
}

.result-button-center {
margin-left: 100px;
margin-right: 100px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
}

.game-screen-margin-top {
margin-top: 50px;
}
Expand Down
44 changes: 23 additions & 21 deletions Client/src/screens/ResultScreen/ResultScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,30 @@ export function ResultScreen(): React.ReactElement {

</div>

<div className="result-button-center">
<ButtonBar>
<DefaultButton
onClick={() => {
const link = document.createElement('a');
link.href = '/career_craft_certificate_with_logo.png';
link.download = 'career_craft_certificate_with_logo.png';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}}
title="Download Certificate"
label="Download Certificate"
/>
<DefaultButton
onClick={() => {
window.location.href = "/";
}}
title="Start game"
label="Explore another career!"
/>
</ButtonBar>
</div>

<ButtonBar>
<DefaultButton
onClick={() => {
const link = document.createElement('a');
link.href = '/career_craft_certificate_with_logo.png';
link.download = 'career_craft_certificate_with_logo.png';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}}
title="Download Certificate"
label="Download Certificate"
/>
<DefaultButton
onClick={() => {
window.location.href = "/";
}}
title="Start game"
label="Explore another career!"
/>
</ButtonBar>
</div>

{showConfetti && (
Expand Down

0 comments on commit f2a6634

Please sign in to comment.