import * as React from 'react'; import { Checkbox as ChakraCheckbox } from '@chakra-ui/react'; export interface CheckboxProps extends ChakraCheckbox.RootProps { icon?: React.ReactNode; inputProps?: React.InputHTMLAttributes; rootRef?: React.Ref; } export const Checkbox = React.forwardRef( function Checkbox(props, ref) { const { icon, children, inputProps, rootRef, ...rest } = props; return ( {icon || } {children != null && ( {children} )} ); } );