🩹 Fix React deprecation warnings

This commit is contained in:
Philipp Stracker 2025-01-28 12:53:33 +01:00
parent dc6c8e2316
commit d547a3b218
No known key found for this signature in database
4 changed files with 5 additions and 3 deletions

View file

@ -5,7 +5,7 @@ const ControlToggleButton = ( { label, description, value, onChange } ) => (
<Action>
<ToggleControl
className="ppcp--control-toggle"
__nextHasNoMarginBottom={ true }
__nextHasNoMarginBottom
checked={ value }
onChange={ onChange }
label={ label }

View file

@ -29,7 +29,7 @@ const PaymentMethodItemBlock = ( {
</p>
<div className="ppcp--method-footer">
<ToggleControl
__nextHasNoMarginBottom={ true }
__nextHasNoMarginBottom
checked={ isSelected }
onChange={ onSelect }
/>

View file

@ -43,6 +43,7 @@ const SettingsToggleBlock = ( {
</div>
<div className="ppcp-r-toggle-block__switch">
<ToggleControl
__nextHasNoMarginBottom
ref={ toggleRef }
checked={ isToggled }
onChange={ ( newState ) => setToggled( newState ) }

View file

@ -66,7 +66,7 @@ const Modal = ( { method, setModalIsVisible, onSave } ) => {
return (
<div className="ppcp-r-modal__field-row">
<TextControl
__nextHasNoMarginBottom={ true }
__nextHasNoMarginBottom
className="ppcp-r-vertical-text-control"
label={ field.label }
value={ settings[ key ] }
@ -84,6 +84,7 @@ const Modal = ( { method, setModalIsVisible, onSave } ) => {
return (
<div className="ppcp-r-modal__field-row">
<ToggleControl
__nextHasNoMarginBottom
label={ field.label }
checked={ settings[ key ] }
onChange={ ( value ) =>