From ea5c3c2c014e49fec45544ed6bb6db450b26a511 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Mon, 18 Sep 2023 18:25:38 +0100 Subject: [PATCH] UI Change for Title Question --- src/components/RoadmapTitleQuestion.tsx | 43 ++++++++++++++----------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/src/components/RoadmapTitleQuestion.tsx b/src/components/RoadmapTitleQuestion.tsx index 1a31a6179..12a51c731 100644 --- a/src/components/RoadmapTitleQuestion.tsx +++ b/src/components/RoadmapTitleQuestion.tsx @@ -1,7 +1,7 @@ -import {ChevronDown, ChevronUp, GraduationCap} from 'lucide-react'; +import { ChevronDown, ChevronUp, GraduationCap } from 'lucide-react'; import { useRef, useState } from 'react'; import { useOutsideClick } from '../hooks/use-outside-click'; -import {markdownToHtml} from "../lib/markdown"; +import { markdownToHtml } from '../lib/markdown'; type RoadmapTitleQuestionProps = { question: string; @@ -24,40 +24,47 @@ export function RoadmapTitleQuestion(props: RoadmapTitleQuestionProps) {
)}

{ e.preventDefault(); setIsAnswerVisible(!isAnswerVisible); }} > - - - { question } + + + {question}

- {isAnswerVisible && ( -
-

setIsAnswerVisible(false)}> +
+ {isAnswerVisible && ( +

setIsAnswerVisible(false)} + > - - { question } + + {question}

-
-
-
- )} + )} +
+

); }