PluginProbe
ElasticPress / 5.3.5
ElasticPress v5.3.5
5.3.5 5.3.4 3.6.5 3.6.6 4.0.0 4.0.1 4.1.0 4.2.0 4.2.1 4.2.2 4.3.0 4.3.1 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.6.0 4.6.1 4.7.0 4.7.1 4.7.2 5.0.0 5.0.1 5.0.2 All 108 releases
elasticpress / assets / js / sync-ui / components / offset.js

offset.js in ElasticPress 5.3.5, at assets/js/sync-ui/components/offset.js

37 lines 865 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 __nextHasNoMarginBottom
33 __next40pxDefaultSize
34 />
35 );
36 };
37