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 {
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';
function Score() {
type StatsProps = {
loaded: boolean;
}
function Score({loaded}: StatsProps) {
const {
timer,
score,
accuracy,
} = useTypingContext();
if (!loaded) return;
return (
<div className='score'>
<p>Time: {timer}</p>
+2 -2
View File
@@ -1,5 +1,5 @@
.container {
display: grid;
grid-template-columns: repeat(2, 1fr);
display: flex;
flex-direction: column;
column-gap: 1rem;
}
+1 -1
View File
@@ -43,7 +43,7 @@ function Typing() {
<TypingContextProvider>
<div className='container'>
<Code code={code} loaded={loaded} />
<Stats />
<Stats loaded={loaded} />
</div>
</TypingContextProvider>
);