From c26ae6194f6b30f328537fda4b3ef0fb5fdf54a0 Mon Sep 17 00:00:00 2001 From: WindowsCrashed Date: Mon, 7 Aug 2023 23:09:54 -0300 Subject: [PATCH] add collapse to question card --- .../pages/assessment/components/QuestionCard.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/javascript/pages/assessment/components/QuestionCard.tsx b/app/javascript/pages/assessment/components/QuestionCard.tsx index 432c8a9..7981830 100644 --- a/app/javascript/pages/assessment/components/QuestionCard.tsx +++ b/app/javascript/pages/assessment/components/QuestionCard.tsx @@ -8,6 +8,8 @@ interface Props { } export const QuestionCard: FC = ({ title, onAddQuestion, onRemoveQuestion }) => { + const [collapsed, setCollapsed] = useState(false) + const questionId = title.replace(/\s+/g, '') const handleAddQuestion = () => { @@ -32,7 +34,7 @@ export const QuestionCard: FC = ({ title, onAddQuestion, onRemoveQuestion
-
+ {!collapsed &&
Grau de Dificuldade: Media @@ -67,10 +69,13 @@ export const QuestionCard: FC = ({ title, onAddQuestion, onRemoveQuestion ijodsjidsoifidfsiojsdfiojdsfiodfs ijdf iodsf iosd iojdf sijodsf iojdsf ioj sdfiojdf sioj dfsiojsdf iojdfs ijodsfijoidfsijodfsijdfsijo dsiofd ijosdfjiofdsidsfio
-
+
}

-
+
+