diff --git a/packages/web-domains/src/new-meeting/features/get-meeting-info/components/Checkbox/Checkbox.tsx b/packages/web-domains/src/new-meeting/features/get-meeting-info/components/Checkbox/Checkbox.tsx index 675f413f..cccd3bd3 100644 --- a/packages/web-domains/src/new-meeting/features/get-meeting-info/components/Checkbox/Checkbox.tsx +++ b/packages/web-domains/src/new-meeting/features/get-meeting-info/components/Checkbox/Checkbox.tsx @@ -1,31 +1,35 @@ import { Txt } from '@sambad/sds/components'; import { colors } from '@sambad/sds/theme'; -import { forwardRef, InputHTMLAttributes, useId } from 'react'; +import { forwardRef, InputHTMLAttributes, ReactNode, useId } from 'react'; import { CheckboxGroupImpl, useCheckboxContext } from './CheckboxGroupImpl'; +import { CheckboxLabel } from './CheckboxLabel'; import { checkboxCss } from './styles'; export interface CheckboxProps extends InputHTMLAttributes { value: string | number; - label: string; + label: string | ((isChecked?: boolean) => ReactNode); required?: boolean; } export const Checkbox = forwardRef((props, ref) => { - const { children, label, value, required, ...restProps } = props; + const { label, value, required, ...restProps } = props; const checkboxCtx = useCheckboxContext(); const isChecked = checkboxCtx.value?.includes(value); - const checkboxId = `${useId()}-${label}`; + const checkboxId = useId(); return (