import type { LunaticError } from '../../use-lunatic/type'; import { slottableComponent } from '../shared/HOC/slottableComponent'; import { ComponentErrors } from '../shared/ComponentErrors/ComponentErrors'; import { Fieldset } from '../shared/Fieldset/Fieldset'; import { CheckboxOption } from '../shared/Checkbox/CheckboxOption'; import { getShortcutKey } from '../shared/Checkbox/getShortcutKey'; import type { LunaticComponentProps } from '../type'; import { Declarations } from '../shared/Declarations/Declarations'; type Props = Pick< LunaticComponentProps<'CheckboxGroup'>, | 'id' | 'label' | 'description' | 'declarations' | 'shortcut' | 'readOnly' | 'disabled' | 'options' | 'orientation' | 'detailAlwaysDisplayed' | 'shouldBeFiltered' > & { errors?: LunaticError[]; }; export const CustomCheckboxGroup = slottableComponent( 'CheckboxGroup', ({ options, label, description, errors, shortcut, disabled, readOnly, declarations, orientation, detailAlwaysDisplayed, }: Props) => { return (
{options.map((option, index) => { return (
); })}
); } );