/* * The tooltip can't be included in the native toggleControl, so we have to build our own. */ const CheckboxControl = (props) => { const onChangeHandler = (e) => { let fieldValue = !props.field.value; props.onChangeHandler(fieldValue) } const handleKeyDown = (e) => { if (e.key === 'Enter') { e.preventDefault(); onChangeHandler(true); } } let field = props.field; let is_checked = field.value ? 'is-checked' : ''; let is_disabled = props.disabled ? 'is-disabled' : ''; return (