import React, { useCallback } from "react"; import { styled } from "styled-components"; import { Checkbox } from "./types.js"; const CheckboxStyled = styled.input` margin: 3px 10px; cursor: pointer; `; const CheckboxLabel = styled.label` cursor: pointer; display: block; font-weight: normal; & input { vertical-align: middle; } & .checkbox-label-text { vertical-align: middle; } `; interface CheckboxGroupProps { checkboxes: Checkbox[]; setCheckbox: (index: number, checked: boolean) => void; } /** * Controlled checkbox group * @param param0 * @returns */ export function CheckboxGroup({ checkboxes, setCheckbox }: CheckboxGroupProps) { return (