feat: Add heading

This commit is contained in:
sigmasternchen 2024-09-20 22:51:36 +02:00
parent 2f9603264c
commit 619c893517
3 changed files with 28 additions and 14 deletions

View file

@ -7,6 +7,16 @@ body {
background-color: black;
}
h1 {
color: white;
text-align: center;
font-size: 60px;
}
h2 {
font-size: 40px;
}
.setup {
text-align: center;
color: white;
@ -14,6 +24,7 @@ body {
.setup ul {
list-style-type: none;
padding: 0;
}
.setup li {

View file

@ -21,17 +21,20 @@ export const App = () => {
console.log(correct)
return <>{ wordLength === null ?
<SetupScreen
dictionary={dictionary}
selectLength={setWordLength}
/> :
<Game
wordLength={wordLength}
reset={() => setWordLength(null)}
numberOfGuesses={numberOfGuesses}
availableWords={availableWords}
correctWord={correct}
/>
}</>
return <>
<h1>x86-64 Wordle</h1>
{ wordLength === null ?
<SetupScreen
dictionary={dictionary}
selectLength={setWordLength}
/> :
<Game
wordLength={wordLength}
reset={() => setWordLength(null)}
numberOfGuesses={numberOfGuesses}
availableWords={availableWords}
correctWord={correct}
/>
}
</>
};

View file

@ -11,7 +11,7 @@ export const SetupScreen = ({dictionary, selectLength}) => {
.map(length => [length, lengthsMap[length].length]);
return <div className="setup">
<h1>Select word length</h1>
<h2>Select word length</h2>
<ul>
{lengths.map(([length, numberOfWordsWithLength]) =>
<li key={length} onClick={() => selectLength(parseInt(length))}>