File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { ProgressBar , ToggleControl , getRedirectUrl } from '@automattic/jetpack-components' ;
1+ import { ProgressBar , getRedirectUrl } from '@automattic/jetpack-components' ;
2+ import { ToggleControl } from '@wordpress/components' ;
23import { createInterpolateElement } from '@wordpress/element' ;
34import { __ , _x , sprintf } from '@wordpress/i18n' ;
45import { Component } from 'react' ;
@@ -114,9 +115,12 @@ class Media extends Component {
114115 </ ModuleToggle >
115116 < FormFieldset >
116117 < ToggleControl
118+ __nextHasNoMarginBottom
117119 id = "videopress-site-privacy"
118- disabled = { ! this . props . getOptionValue ( 'videopress' ) }
119- toggling = { this . props . isSavingAnyOption ( 'videopress_private_enabled_for_site' ) }
120+ disabled = {
121+ ! this . props . getOptionValue ( 'videopress' ) ||
122+ this . props . isSavingAnyOption ( 'videopress_private_enabled_for_site' )
123+ }
120124 checked = { this . props . getOptionValue ( 'videopress_private_enabled_for_site' ) }
121125 onChange = { this . togglePrivacySetting }
122126 label = {
Original file line number Diff line number Diff line change 1- import { ToggleControl , getRedirectUrl } from '@automattic/jetpack-components' ;
1+ import { getRedirectUrl } from '@automattic/jetpack-components' ;
2+ import { ToggleControl } from '@wordpress/components' ;
23import { __ } from '@wordpress/i18n' ;
34import { Fragment , useCallback , useEffect } from 'react' ;
45import { connect } from 'react-redux' ;
@@ -92,9 +93,9 @@ function Search( props ) {
9293
9394 < FormFieldset >
9495 < ToggleControl
96+ __nextHasNoMarginBottom
9597 checked = { isModuleEnabled && isInstantSearchEnabled }
96- disabled = { togglingModule || ! props . hasInstantSearch }
97- toggling = { togglingInstantSearch }
98+ disabled = { togglingModule || ! props . hasInstantSearch || togglingInstantSearch }
9899 onChange = { toggleInstantSearch }
99100 label = {
100101 < span className = "jp-form-toggle-explanation" >
Original file line number Diff line number Diff line change 1- import { ToggleControl , getRedirectUrl } from '@automattic/jetpack-components' ;
1+ import { getRedirectUrl } from '@automattic/jetpack-components' ;
2+ import { ToggleControl } from '@wordpress/components' ;
23import { __ , sprintf } from '@wordpress/i18n' ;
34import { Component } from 'react' ;
45import { connect } from 'react-redux' ;
@@ -248,10 +249,10 @@ const SpeedUpSite = withModuleSettingsFormHelpers(
248249 </ p >
249250 { canAppearInSearch && (
250251 < ToggleControl
252+ __nextHasNoMarginBottom
251253 checked = { siteAcceleratorStatus }
252- toggling = { togglingSiteAccelerator }
253254 onChange = { this . handleSiteAcceleratorChange }
254- disabled = { ! canDisplaySiteAcceleratorSettings }
255+ disabled = { ! canDisplaySiteAcceleratorSettings || togglingSiteAccelerator }
255256 label = {
256257 < span className = "jp-form-toggle-explanation" >
257258 { __ ( 'Enable site accelerator' , 'jetpack' ) }
Original file line number Diff line number Diff line change 1+ Significance: patch
2+ Type: other
3+
4+ Performance settings: import ToggleControl from @wordpress/components instead of @automattic/jetpack-components.
You can’t perform that action at this time.
0 commit comments