import { FC, useState } from "react"; import ReactMarkdown from "react-markdown"; import { Grid, Box, Accordion, AccordionSummary, AccordionDetails, } from "@mui/material"; import { ChevronRight as ChevronRightIcon, ExpandMore as ExpandMoreIcon, Circle as CircleIcon, } from "@mui/icons-material"; import { useAppContext } from "./AppProvider"; interface QuestionProps { question: string; answer: string; } export const Question: FC = ({ question, answer }) => { const [expanded, setExpanded] = useState(false); const { colors: { lavender, darkLavender }, typography: { h5, p }, } = useAppContext(); return ( setExpanded(!expanded)} elevation={0} sx={{ "::before": { display: "none" } }} > {question} {expanded ? ( ) : ( )} {answer} ); };