RatingForm.tsx 1020 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
import React from "react";
import { RatingType } from "../types";

type Props = {
  element: RatingType;
  //   deleteValue: (e: React.MouseEvent<HTMLButtonElement>) => void;
};

export const QRating = ({ element }: Props) => {
  return (
jang dong hyeok's avatar
.    
jang dong hyeok committed
11
12
13
14
15
16
17
18
19
    <div className="flex place-content-between items-center p-5">
      <input
        name="minRateDescription"
        id={element._id}
        className="border-b-2 text-center"
        size={10}
        placeholder={element.content.minRateDescription}
      ></input>
      {element.content.choices.map((e) => (
20
        <input
jang dong hyeok's avatar
.    
jang dong hyeok committed
21
          name="text"
22
23
          id={element._id}
          type="text"
jang dong hyeok's avatar
.    
jang dong hyeok committed
24
25
26
          className="border border-black rounded-full py-1 m-2 text-center"
          size={1}
          placeholder={e.text}
27
        ></input>
jang dong hyeok's avatar
.    
jang dong hyeok committed
28
29
30
31
32
33
34
35
      ))}
      <input
        name="maxRateDescription"
        id={element._id}
        className="border-b-2 text-center"
        size={10}
        placeholder={element.content.maxRateDescription}
      ></input>
36
37
38
    </div>
  );
};