ARadioForm.tsx 460 Bytes
Newer Older
Lee SeoYeon's avatar
Lee SeoYeon committed
1
2
3
import React from "react";
import { RadioType } from "../types";

4
5
6
type Props = {
  element: RadioType;
};
Lee SeoYeon's avatar
Lee SeoYeon committed
7

8
export const ARadioForm = ({ element }: Props) => {
Lee SeoYeon's avatar
Lee SeoYeon committed
9
  return (
Lee SeoYeon's avatar
Lee SeoYeon committed
10
    <div className="flex w-full gap-2 justify-around my-3">
11
12
      {element.content.choices.map((choice) => (
        <div>
Lee SeoYeon's avatar
Lee SeoYeon committed
13
14
          <input className="mr-2 w-4 h-4" type="radio"></input>
          <label className="text-lg">{choice.text}</label>
Lee SeoYeon's avatar
Lee SeoYeon committed
15
        </div>
16
      ))}
Lee SeoYeon's avatar
Lee SeoYeon committed
17
18
19
    </div>
  );
};