RadioForm.tsx 481 Bytes
Newer Older
1
2
3
4
5
6
7
import React from "react";
import { RadioType } from "../types";

type Props = {
  element: RadioType;
};

jang dong hyeok's avatar
.    
jang dong hyeok committed
8
export const RadioForm = ({ element }: Props) => {
9
  return (
jang dong hyeok's avatar
.    
jang dong hyeok committed
10
11
12
13
14
15
16
17
18
19
20
21
    <div className="flex mt-4">
      {element.content.choices.map((e: any, index: number) => (
        <div>
          <input
            type="radio"
            id={element._id}
            name="choice"
            value={e.text}
            disabled
          />
        </div>
      ))}
22
23
24
    </div>
  );
};