import './index.css' import { forwardRef, memo } from 'react' import { useId } from '@react-aria/utils' import CheckboxInput, { CheckboxInputProps } from './CheckboxInput' import { CheckboxWithLabel } from './CheckboxWithLabel' export type CheckboxProps = CheckboxInputProps const Checkbox = forwardRef( function Checkbox({ disabled, className, id, children, ...props }, ref) { const htmlId = useId(id) const noChildren = children === undefined const input = ( ) if (noChildren) { return input } return ( {children} ) }, ) export default memo(Checkbox)