| 1 |
/** |
| 2 |
* WordPress dependencies. |
| 3 |
*/ |
| 4 |
import { TextControl } from '@wordpress/components'; |
| 5 |
import { WPElement } from '@wordpress/element'; |
| 6 |
import { __ } from '@wordpress/i18n'; |
| 7 |
|
| 8 |
/** |
| 9 |
* Internal dependencies. |
| 10 |
*/ |
| 11 |
import { useSync } from '../../sync'; |
| 12 |
import { useSyncSettings } from '../provider'; |
| 13 |
|
| 14 |
/** |
| 15 |
* Delete checkbox component. |
| 16 |
* |
| 17 |
* @returns {WPElement} Sync page component. |
| 18 |
*/ |
| 19 |
export default () => { |
| 20 |
const { isSyncing } = useSync(); |
| 21 |
const { args, setArgs } = useSyncSettings(); |
| 22 |
|
| 23 |
return ( |
| 24 |
<TextControl |
| 25 |
className="ep-sync-advanced-control" |
| 26 |
disabled={isSyncing} |
| 27 |
help={__('Specify the number of objects to skip during syncing.', 'elasticpress')} |
| 28 |
label={__('Skip objects', 'elasticpress')} |
| 29 |
onChange={(offset) => setArgs({ ...args, offset })} |
| 30 |
type="number" |
| 31 |
value={args.offset} |
| 32 |
/> |
| 33 |
); |
| 34 |
}; |
| 35 |
|