/* eslint-disable react/jsx-props-no-spreading */ import React, { Children } from 'react' import type { CheckboxGroupProps } from '@toptal/picasso-checkbox' import { CheckboxCompound as PicassoCheckbox } from '@toptal/picasso-checkbox' import type { FieldProps } from '../Field' import PicassoField from '../Field' import type { Props as FieldLabelProps } from '../FieldLabel' import FieldLabel from '../FieldLabel' import CheckboxGroupContext from './CheckboxGroupContext' type ValueType = string[] | undefined export type Props = CheckboxGroupProps & FieldProps & FieldLabelProps export const CheckboxGroup = (props: Props) => { const { children, titleCase, label, labelEndAdornment, initialValue, ...rest } = props const alignment = Children.count(children) > 2 ? 'top' : 'middle' return ( ) : null } > {() => ( {children} )} ) } CheckboxGroup.displayName = 'CheckboxGroup' export default CheckboxGroup