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

refac: modify restart modal #75

Merged
merged 4 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
13 changes: 9 additions & 4 deletions client/src/components/RestartModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,23 @@ interface ConfirmationModalProps {
message: string;
onConfirm: () => void;
onCancel: () => void;
extraMessage: string;
}

const ConfirmationModal: React.FC<ConfirmationModalProps> = ({message, onConfirm, onCancel}) => {
const ConfirmationModal: React.FC<ConfirmationModalProps> = ({message, onConfirm, onCancel, extraMessage}) => {
return (
<div className="restartCon">
<div className="innerRestartCon">
<div className="innerRestart">
<p>{message}</p>
<p className='restartMessage'>{message}<br /> {extraMessage}</p>
<div className="chooseAns">
<button onClick={onConfirm}>Yes</button>
<button onClick={onCancel}>No</button>
<button onClick={onCancel}><span>No</span></button>
<button onClick={onConfirm}><span>Yes</span></button>

</div>
</div>
</div>

</div>
)
}
Expand Down
59 changes: 51 additions & 8 deletions client/src/styles/RestartGameModal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,76 @@
justify-content: center;
align-items: center;
z-index: 20;

}
.innerRestartCon{
background: linear-gradient(180deg, #2dccfd 0%, #ff01ff 100%);
border-radius: 8px;
padding: 1px;
}

.innerRestart {
background: #edeee9;
background-color: #0e0121;
color: white;
padding: 20px;
border-style: solid;
border-width: 0.2px;
border-radius: 8px;
border-color: transparent;
text-align: center;
width: 33rem;
height: 23rem;
display: flex;
flex-direction: column;
justify-content: space-between;
}

.restartMessage{
text-align: center;
margin-top: 20%;
font-size: 1.4rem;
font-weight: 100;
}

.chooseAns {
margin-top: 20px;
width: 100%;
display: flex;
justify-content: space-between;
}

.chooseAns button {
margin: 0 10px;
display: block;
padding: 10px 20px;
border: none;
border: 1px solid #007bff;
border-radius: 5px;
cursor: pointer;
width: 100%;
font-weight: bold;
color: #fff;
height: 50px;
span{
font-size: 24px;
display: inline-block;
transition: all .3s ease-in-out;
transform: scale(1);
}
span:hover{
transform: scale(1.8);
}
}


.chooseAns button:first-of-type {
background: #007bff;
color: #fff;
background: transparent;
margin-right: 1rem;
text-shadow: 0 0 3px #fff;
}

.chooseAns button:last-of-type {
background: #ccc;
background: linear-gradient(
-180deg,
#2dccfd 0%,
#1b0043 100%
);
box-shadow: 0 0 10px rgba(255, 255,255, 0.3);
}

Loading