FileForm.tsx 1.5 KB
Newer Older
1
2
import React, { useState } from "react";
import { FileType } from "../types";
Lee SeoYeon's avatar
Lee SeoYeon committed
3
4
// import { useQuestion } from "./question.context";
// import { TypeChange } from "./typeDD";
5
6
7
8
9
10

type Props = {
  element: FileType;
};

export const QFile = ({ element }: Props) => {
Lee SeoYeon's avatar
Lee SeoYeon committed
11
  //   const { questionListChange } = useQuestion();
12
13
14
15
16
17
18
19
20
21

  return (
    <div className="flex flex-col container w-4/5 h-auto border-2 border-themeColor items-center m-3 py-2">
      <div className="flex h-16 w-full place-content-between items-center">
        <input
          type="text"
          name="title"
          id={element._id}
          className="text-xl font-bold ml-6 border-b-2 w-1/2"
          placeholder={element.title}
Lee SeoYeon's avatar
Lee SeoYeon committed
22
          //   onChange={questionListChange}
23
        ></input>
Lee SeoYeon's avatar
Lee SeoYeon committed
24
        {/* <TypeChange tt="file" /> */}
25
26
27
28
29
30
31
32
      </div>
      <div className="flex w-full justify-center">
        <input
          type="text"
          name="comment"
          id={element._id}
          className="border w-11/12"
          placeholder="질문에 대한 설명을 입력해주세요"
Lee SeoYeon's avatar
Lee SeoYeon committed
33
          //   onChange={questionListChange}
34
35
36
37
38
39
40
41
42
43
44
45
46
        ></input>
      </div>
      <div id="commentarea" className="flex mt-4 w-full justify-center">
        <input type="file" className=" w-11/12 h-16" disabled></input>
      </div>
      <div className="flex w-full justify-end py-2">
        <button className="w-1/12">필수</button>
        <button className="w-1/12">옵션</button>
        <button className="w-1/12">삭제</button>
      </div>
    </div>
  );
};