diff --git a/modules/shared/components/studySession/GameCard.tsx b/modules/shared/components/studySession/GameCard.tsx new file mode 100644 index 0000000..9476401 --- /dev/null +++ b/modules/shared/components/studySession/GameCard.tsx @@ -0,0 +1,84 @@ +import React, { useState } from "react"; +import { Box, Text } from "@chakra-ui/react"; +import { motion } from "framer-motion"; + +interface CardSide { + image?: string; + text: string; +} + +interface GameCardPops { + sideA: CardSide; + sideB: CardSide; +} + +export const GameCard: React.FC = ({ sideA, sideB }) => { + const [flip, setFlip] = useState(false); + const MotionBox = motion(Box); + + return ( + <> + + setFlip(!flip)} + borderRadius="10px" + width={{ base: "250px", md: "500px" }} + height="300px" + position="relative" + cursor="pointer" + > + + {sideA.image && } + + {sideA.text} + + + + {sideB.image && } + + {sideB.text} + + + + + + ); +};