aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Guess/index.styled.ts
diff options
context:
space:
mode:
authorBrendan F <EpicWolverine@users.noreply.github.com>2024-02-19 20:35:50 -0800
committerBrendan F <EpicWolverine@users.noreply.github.com>2024-02-19 20:35:50 -0800
commit647edc9389b24bda19503514170ed31301ea0a72 (patch)
tree2b76df7a0e6ada2ad0042d91b3b7b2a679e2f5e8 /src/components/Guess/index.styled.ts
parentaa3a3063cbbd449ecd8b0d6092fd83ea4db27984 (diff)
Add guess states and exact artist match as a yellow
Diffstat (limited to 'src/components/Guess/index.styled.ts')
-rw-r--r--src/components/Guess/index.styled.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/components/Guess/index.styled.ts b/src/components/Guess/index.styled.ts
index 5118b70..a235355 100644
--- a/src/components/Guess/index.styled.ts
+++ b/src/components/Guess/index.styled.ts
@@ -1,8 +1,10 @@
import styled from "styled-components";
+import { GuessState } from "../../types/guess";
+
export const Container = styled.div<{
active: boolean;
- isCorrect: boolean | undefined;
+ state: GuessState | undefined;
}>`
width: 100%;
height: 45px;
@@ -12,10 +14,12 @@ export const Container = styled.div<{
display: flex;
align-items: center;
- border-color: ${({ theme, active, isCorrect }) => {
+ border-color: ${({ theme, active, state }) => {
if (active) {
return theme.border;
- } else if (isCorrect === false) {
+ } else if (state === GuessState.PartiallyCorrect) {
+ return theme.yellow;
+ } else if (state === GuessState.Incorrect) {
return theme.red;
} else {
return theme.border100;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage