diff --git a/src/Components/Face/index.sass b/src/Components/Face/index.sass index 99bf6bb..2249b37 100644 --- a/src/Components/Face/index.sass +++ b/src/Components/Face/index.sass @@ -1,7 +1,7 @@ .face display: flex - button + &__button width: 30px height: 30px diff --git a/src/Components/Face/index.tsx b/src/Components/Face/index.tsx index 84796b3..9e8f7bd 100644 --- a/src/Components/Face/index.tsx +++ b/src/Components/Face/index.tsx @@ -1,31 +1,21 @@ +import { GameStates, STATE_LIST } from "@/Components/Menu" import "./index.sass" -export type FaceTypes = "lose" | "win" | "game" | "start" - -type stateList = { - [key in FaceTypes]: string -} - -const STATE_LIST: stateList = { - lose: "💀", - win: "😎", - game: "🙂", - start: "🙂", -} - -type faceProps = { - state: FaceTypes +interface FaceProps { + gameState: GameStates onResetGame: () => void } -export function Face({ state, onResetGame }: faceProps) { +export function Face({ gameState, onResetGame }: FaceProps) { const onClick = () => { onResetGame() } return (
- +
) }