ARadioForm.tsx 453 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 (
10
11
12
13
14
    <div className="flex w-full gap-4 justify-around my-3">
      {element.content.choices.map((choice) => (
        <div>
          <input className="mr-2" type="radio"></input>
          <label className="text-lg">{choice.value}</label>
Lee SeoYeon's avatar
Lee SeoYeon committed
15
        </div>
16
      ))}
Lee SeoYeon's avatar
Lee SeoYeon committed
17
18
19
    </div>
  );
};