ACheckbox.tsx 473 Bytes
Newer Older
1
2
import React, { useEffect } from "react";
import { CheckboxType } from "../types";
Lee SeoYeon's avatar
Lee SeoYeon committed
3

4
5
6
7
8
type Props = {
  element: CheckboxType;
};

export const ACheckboxForm = ({ 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="checkbox" />
          <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>
  );
};