From 647edc9389b24bda19503514170ed31301ea0a72 Mon Sep 17 00:00:00 2001 From: Brendan F Date: Mon, 19 Feb 2024 20:35:50 -0800 Subject: Add guess states and exact artist match as a yellow --- src/components/Guess/index.styled.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/components/Guess/index.styled.ts') 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; -- cgit v1.2.3