From ff284f3cfbfa78439c9e70fb2cb0437f15b7d94b Mon Sep 17 00:00:00 2001 From: "Jiwon Yoon@na" Date: Mon, 19 Sep 2022 10:47:26 +0900 Subject: [PATCH] =?UTF-8?q?AQuestion=20ui=EC=88=98=EC=A0=95=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/forms/ACheckbox.tsx | 4 ++-- frontend/src/forms/ARadio.tsx | 4 ++-- frontend/src/surveys/AQuestion.tsx | 12 +++++++----- frontend/src/surveys/AnswerSurvey.tsx | 8 ++++++-- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/frontend/src/forms/ACheckbox.tsx b/frontend/src/forms/ACheckbox.tsx index ced8ec9..b3020ad 100644 --- a/frontend/src/forms/ACheckbox.tsx +++ b/frontend/src/forms/ACheckbox.tsx @@ -49,7 +49,7 @@ export const ACheckbox = ({ // console.log("content:", content); return ( -
+
{element.content.choices.map((choice) => (
- +
))}
diff --git a/frontend/src/forms/ARadio.tsx b/frontend/src/forms/ARadio.tsx index c2d7f51..7cb1895 100644 --- a/frontend/src/forms/ARadio.tsx +++ b/frontend/src/forms/ARadio.tsx @@ -16,7 +16,7 @@ export const ARadio = ({ element, answer: answerQuestion }: IAnswerProps) => { console.log(answerQuestion); }; return ( -
+
{element.content.choices.map((choice) => (
{ onChange={handleChange} value={choice.text} > -
diff --git a/frontend/src/surveys/AQuestion.tsx b/frontend/src/surveys/AQuestion.tsx index 8658606..ab3757d 100644 --- a/frontend/src/surveys/AQuestion.tsx +++ b/frontend/src/surveys/AQuestion.tsx @@ -9,16 +9,18 @@ type Props = { export const AQuestion = ({ question, answer }: Props) => { return ( -
-
-
{question.title}
+
+
{question.isRequired ? ( -
* 필수질문
+
* 필수질문
) : ( <> )} +
{question.title}
+
+
+ {question.comment}
-
{question.comment}
{getAnswerElementByType(question, answer)}
); diff --git a/frontend/src/surveys/AnswerSurvey.tsx b/frontend/src/surveys/AnswerSurvey.tsx index 4b0b7fb..46cdfe3 100644 --- a/frontend/src/surveys/AnswerSurvey.tsx +++ b/frontend/src/surveys/AnswerSurvey.tsx @@ -114,8 +114,12 @@ export const AnswerSurvey = () => {
-

{survey.title}

-

{survey.comment}

+

+ {survey.title} +

+

+ {survey.comment} +

{answers.map((answer) => { return (