mirror of
https://github.com/hazemKrimi/touch-programming.git
synced 2026-05-01 18:20:26 +00:00
Improving styles wip
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
.score {
|
.score {
|
||||||
text-align: right;
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 1rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user