import { Checkbox, Label } from '#components'; import { FieldGroup } from '../FieldGroup/FieldGroup.tsx'; import type { SetFieldProps } from './SetField.tsx'; export type SetFieldListboxProps = SetFieldProps & { onCheckedChange: (option: T, isChecked: boolean) => void; }; export const SetFieldListbox = ({ description, disabled, error, label, name, onCheckedChange, options, readOnly, value }: SetFieldListboxProps) => { return (
{Object.keys(options).map((option) => ( { onCheckedChange(option as T, !checked); }} /> ))}
); };