import { ToggleControl } from '@wordpress/components';

const ToggleField = ( { field, value, onChange } ) => (
	<ToggleControl
		label={ field.label }
		checked={ Boolean( value ) }
		onChange={ onChange }
		help={ field.help }
	/>
);

export default ToggleField;
