Improving styles wip

This commit is contained in:
2025-02-15 19:12:48 +01:00
parent 4bb441a125
commit d3c6a4e024
4 changed files with 14 additions and 5 deletions
+4 -1
View File
@@ -1,3 +1,6 @@
.score { .score {
text-align: right; display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem;
} }
+7 -1
View File
@@ -2,13 +2,19 @@ import { useTypingContext } from "contexts/typing";
import './index.css'; import './index.css';
function Score() { type StatsProps = {
loaded: boolean;
}
function Score({loaded}: StatsProps) {
const { const {
timer, timer,
score, score,
accuracy, accuracy,
} = useTypingContext(); } = useTypingContext();
if (!loaded) return;
return ( return (
<div className='score'> <div className='score'>
<p>Time: {timer}</p> <p>Time: {timer}</p>
+2 -2
View File
@@ -1,5 +1,5 @@
.container { .container {
display: grid; display: flex;
grid-template-columns: repeat(2, 1fr); flex-direction: column;
column-gap: 1rem; column-gap: 1rem;
} }
+1 -1
View File
@@ -43,7 +43,7 @@ function Typing() {
<TypingContextProvider> <TypingContextProvider>
<div className='container'> <div className='container'>
<Code code={code} loaded={loaded} /> <Code code={code} loaded={loaded} />
<Stats /> <Stats loaded={loaded} />
</div> </div>
</TypingContextProvider> </TypingContextProvider>
); );