Q_Assay.tsx 1.84 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
import React, { useState } from "react";
import { EssayType, BasicQuestionType } from "./Question";

type Props = {
  element: EssayType;
  questionList: BasicQuestionType[];
};

export const Q_Assay = ({ element, questionList }: Props) => {
  console.log(questionList);
  return (
    <div className="flex flex-col container w-4/5 h-auto border-2 border-themeColor items-center m-3 py-2">
Jiwon Yoon's avatar
Jiwon Yoon committed
13
14
      <div className="flex h-16 w-full place-content-between items-center">
        <p className="text-xl font-bold ml-6 border-b-2">
15
16
17
18
          <input type="text" placeholder={element.title}></input>
        </p>
        <select
          id="Questions"
Jiwon Yoon's avatar
Jiwon Yoon committed
19
          className="w-36 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-themeColor w-full mr-3 p-2.5"
20
21
22
23
24
25
26
27
28
29
30
31
32
        >
          <option>질문종류</option>
          <option value="Essay" selected>
            주관식
          </option>
          <option value="MultipleChoice">객관식</option>
          <option value="Dropdown">드롭다운(객관식)</option>
          <option value="CheckBox">체크박스(객관식)</option>
          <option value="Rating">선형</option>
          <option value="Grid">그리드</option>
          <option value="Date">날짜</option>
        </select>
      </div>
Jiwon Yoon's avatar
Jiwon Yoon committed
33
      <div className="flex w-full">
34
35
36
37
38
39
40
41
        <textarea
          className="border"
          rows={1}
          cols={80}
          placeholder="질문에 대한 설명을 입력해주세요"
        ></textarea>
      </div>
      <div id="commentarea" className="flex border mt-4">
Jiwon Yoon's avatar
Jiwon Yoon committed
42
        <textarea className="resize-none" readOnly></textarea>
43
      </div>
Jiwon Yoon's avatar
Jiwon Yoon committed
44
      <div className="flex w-full justify-end py-2">
45
        <button className="w-1/12">필수</button>
Jiwon Yoon's avatar
Jiwon Yoon committed
46
        <button className="w-1/12">옵션</button>
47
48
49
50
51
        <button className="w-1/12">삭제</button>
      </div>
    </div>
  );
};