-
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.
Feat: Create Header component and styles
- Loading branch information
1 parent
11695a0
commit 4b5961f
Showing
7 changed files
with
95 additions
and
4 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -33,6 +33,7 @@ export default [ | |
'warn', | ||
{ allowConstantExport: true }, | ||
], | ||
'react/props-types':'off' | ||
}, | ||
}, | ||
] |
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
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,18 @@ | ||
import pokemonLogo from '../assets/256px-International_Pokémon_logo.svg.png'; | ||
import '../styles/Header.css'; | ||
|
||
export default function Header({ text, logoAltText }) { | ||
return ( | ||
<header> | ||
<img src={pokemonLogo} alt={logoAltText} /><h1>{text}</h1> | ||
<div className="scores"> | ||
<div className="score"> | ||
<strong>Score: </strong><span>20</span> | ||
</div> | ||
<div className="score"> | ||
<strong>Highest Score: </strong><span>16</span> | ||
</div> | ||
</div> | ||
</header> | ||
) | ||
} |
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 |
---|---|---|
@@ -1 +1,11 @@ | ||
|
||
*{ | ||
padding: 0; | ||
margin: 0; | ||
box-sizing: border-box; | ||
user-select: none; | ||
} | ||
:root{ | ||
padding: 0; | ||
margin: 0; | ||
background-color: rgba(217, 241, 79, 0.754); | ||
} |
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,58 @@ | ||
header{ | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
font-family: "Press Start 2P", system-ui; | ||
background-color: rgb(233, 7, 7); | ||
padding: 1em 0; | ||
gap:1em | ||
} | ||
|
||
header h1{ | ||
font-size: 1.4rem; | ||
} | ||
|
||
.scores{ | ||
width: 100%; | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: center; | ||
align-items: start; | ||
gap: 2em; | ||
padding: 1em; | ||
text-align: left; | ||
|
||
} | ||
|
||
.score{ | ||
font-size: 1rem; | ||
} | ||
|
||
.score > strong { | ||
color: wheat; | ||
text-shadow:2px 3px 1px rgb(60, 6, 255); | ||
} | ||
|
||
.score span{ | ||
color: rgb(44, 103, 186); | ||
background-color: white; | ||
border-radius: 10%; | ||
height: 50px; | ||
width: 50px; | ||
border: none; | ||
padding: 10px; | ||
font-weight: 900; | ||
} | ||
|
||
@media (max-width:600px) { | ||
.scores{ | ||
justify-content: center; | ||
width: 100%; | ||
flex-direction: column; | ||
} | ||
|
||
.score{ | ||
font-size: .8rem; | ||
padding:.5em; | ||
} | ||
} |