-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b2ba7a
commit 190b971
Showing
9 changed files
with
184 additions
and
31 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import useChallenge from '../../hooks/useChallenge'; | ||
import styles from './styles.module.scss'; | ||
|
||
export function LevelUpModal(){ | ||
const { level, setIsLevelUpModalOpen } = useChallenge(); | ||
|
||
return( | ||
<div className={styles.overlay}> | ||
<div className={styles.container}> | ||
<header>{level}</header> | ||
|
||
<strong>Parabéns</strong> | ||
|
||
<p>Você alcançou um novo level.</p> | ||
|
||
<button type="button" onClick={()=>setIsLevelUpModalOpen(false)}> | ||
<img src="/icons/close.svg" alt="Fechar" /> | ||
</button> | ||
</div> | ||
</div> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
.overlay { | ||
background-color: rgba(242, 243, 245, 0.8); | ||
position: fixed; | ||
top: 0; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
|
||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
|
||
.container { | ||
background-color: var(--white); | ||
width: 100%; | ||
max-width: 400px; | ||
padding: 2rem 3rem; | ||
border-radius: 5px; | ||
box-shadow: 0 0 60px rgba(0, 0, 0, 0.05); | ||
text-align: center; | ||
position: relative; | ||
|
||
header { | ||
font-size: 8.75rem; | ||
font-weight: 600; | ||
color: var(--blue); | ||
background: url('/icons/modalIcon.svg') no-repeat center; | ||
background-size: contain; | ||
} | ||
|
||
strong { | ||
font-size: 2.25rem; | ||
color: var(--text); | ||
} | ||
|
||
p { | ||
font-size: 1.25rem; | ||
color: var(--text); | ||
margin-top: 0.25rem; | ||
} | ||
|
||
button { | ||
position: absolute; | ||
right: 0.5rem; | ||
top: 0.5rem; | ||
background: transparent; | ||
border: 0; | ||
font-size: 0; | ||
} | ||
} | ||
} |
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