function checkboxFormatter(
{ onChange, ...props }: CheckboxFormatterProps,
ref: React.RefObject<HTMLInputElement>
) {
function handleChange(e: React.ChangeEvent<HTMLInputElement>) {
onChange(e.target.checked, (e.nativeEvent as MouseEvent).shiftKey);
}
return <input type="checkbox" ref={ref} {...props} onChange={handleChange} />;
}
any buddy convert this is JavaScript code
i need hear to use him in js in react