diff options
| author | Pinapelz <yukais@pinapelz.com> | 2026-06-02 17:18:08 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-06-02 17:18:08 -0700 |
| commit | a4e823682c16efc0fcdf8fb07ce32bfbb045cd84 (patch) | |
| tree | 943c001e951be8c727ce4ea75e4e08a97d668974 /src/components/Guess | |
| parent | afbe1434a478cc00f4f84c03f0886edd7806d4e3 (diff) | |
fork and restyle, init scaffold for changes
Diffstat (limited to 'src/components/Guess')
| -rw-r--r-- | src/components/Guess/index.styled.ts | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/src/components/Guess/index.styled.ts b/src/components/Guess/index.styled.ts index a235355..dac85ab 100644 --- a/src/components/Guess/index.styled.ts +++ b/src/components/Guess/index.styled.ts @@ -1,43 +1,38 @@ import styled from "styled-components"; - import { GuessState } from "../../types/guess"; +const stateColor = (theme: any, active: boolean, state: GuessState | undefined) => { + if (active) return theme.border; + if (state === GuessState.Correct) return theme.green; + if (state === GuessState.PartiallyCorrect) return theme.yellow; + if (state === GuessState.Incorrect) return theme.red; + return theme.border100; +}; + export const Container = styled.div<{ active: boolean; state: GuessState | undefined; }>` width: 100%; - height: 45px; - - margin: 5px auto; + height: 44px; + margin: 3px 0; display: flex; align-items: center; - border-color: ${({ theme, active, state }) => { - if (active) { - return theme.border; - } else if (state === GuessState.PartiallyCorrect) { - return theme.yellow; - } else if (state === GuessState.Incorrect) { - return theme.red; - } else { - return theme.border100; - } - }}; - border-width: 1px; - border-radius: 5px; - border-style: solid; + background-color: var(--cl-gray-1); + + border: 1px solid ${({ theme, active, state }) => stateColor(theme, active, state)}; + border-left: 4px solid ${({ theme, active, state }) => stateColor(theme, active, state)}; color: ${({ theme }) => theme.text}; `; export const Text = styled.p` + margin: 0; + padding: 0 12px; width: 100%; - height: max-content; - - padding: 0px 10px; - - font-size: 1rem; + font-family: "Roboto Mono", monospace; + font-size: 0.85rem; color: ${({ theme }) => theme.text}; `; |
