From cea45c29701d339318190c95227c05fcc2bdfcf5 Mon Sep 17 00:00:00 2001 From: Damjes Date: Thu, 28 Dec 2023 05:04:21 +0100 Subject: [PATCH] Poprawiono CSS --- src/App.scss | 2 +- src/Gra.scss | 23 ++++++++++++++++++++++- src/Gra.tsx | 7 ++++++- src/Klawiatura.scss | 1 + src/Slowo.scss | 1 + 5 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/App.scss b/src/App.scss index f45006a..e40bb8f 100644 --- a/src/App.scss +++ b/src/App.scss @@ -1,5 +1,5 @@ body { - background-color: #f5f5f5; + background-color: ghostwhite; font-family: 'Roboto', sans-serif; font-size: 1em; margin: 0; diff --git a/src/Gra.scss b/src/Gra.scss index 29fbdd2..a445ba2 100644 --- a/src/Gra.scss +++ b/src/Gra.scss @@ -1,5 +1,26 @@ +$promien: 0.5em; + .gra { text-align: center; - width: 20em; + max-width: 30em; margin: 0 auto; + + .przyciskResetu { + margin: 1em; + border: none; + border-radius: $promien; + padding: $promien; + font-size: 1em; + color: white; + background-color: royalblue; + font-weight: bold; + + &.jeszczeRaz { + background-color: green; + } + + &.naPewno { + background-color: darkorange; + } + } } \ No newline at end of file diff --git a/src/Gra.tsx b/src/Gra.tsx index cc29bf5..993d27b 100644 --- a/src/Gra.tsx +++ b/src/Gra.tsx @@ -113,6 +113,11 @@ function Gra() { (potwierdzeniePoddaniaSię ? () => setWygranko('nie') : () => setPotwierdzeniePoddaniaSię(true)) : resetuj + const klasaResetu = 'przyciskResetu' + (wygranko == '' ? + (potwierdzeniePoddaniaSię ? ' naPewno' : '') : + ' jeszczeRaz' + ) + return
{słowa} @@ -139,7 +144,7 @@ function Gra() { tryb oszusta (debug)

- + { wygranko != '' &&
diff --git a/src/Klawiatura.scss b/src/Klawiatura.scss index 4450510..597447b 100644 --- a/src/Klawiatura.scss +++ b/src/Klawiatura.scss @@ -2,4 +2,5 @@ display: flex; flex-direction: row; flex-wrap: wrap; + justify-content: center; } \ No newline at end of file diff --git a/src/Slowo.scss b/src/Slowo.scss index eb6edd7..7aeb71f 100644 --- a/src/Slowo.scss +++ b/src/Slowo.scss @@ -2,4 +2,5 @@ display: flex; flex-direction: row; font-size: 2em; + justify-content: center; } \ No newline at end of file