import React, { type ChangeEventHandler, type ReactNode } from 'react'; import { classNames } from '../../utils'; import styles from './CheckboxBox.module.css'; import { CheckboxInput } from '../CheckboxInput'; import { useId } from '../../hooks/useId'; import { HighlightIcon } from '../HighlightIcon'; import type { IconName } from '../Icon'; export type CheckboxBoxProps = { /** * The name of the CheckboxBox, used when submitting an HTML form. */ name?: string; /** * The content to display as the label. */ label: string; /** * The content to display as the description. */ description?: ReactNode; /** * The current value */ value?: string; /** * Whether the CheckboxBox is checked. */ isChecked: boolean; /** * Whether the CheckboxBox should be disabled. * @default false */ isDisabled?: boolean; /** * Whether the CheckboxBox is indeterminate. */ isIndeterminate?: boolean; /** * The icon to display in the button */ iconName?: IconName; /** * className for the element */ className?: string; /** * Handler that is called when the value changes. */ onChange: ChangeEventHandler; }; export const CheckboxBox = ({ label, description, value, isDisabled, isChecked, isIndeterminate, iconName, className, onChange, name, ...rest }: CheckboxBoxProps) => { const labelId = useId(); const descriptionId = useId(); return ( ); };