🩹 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> <Action>
<ToggleControl <ToggleControl
className="ppcp--control-toggle" className="ppcp--control-toggle"
__nextHasNoMarginBottom={ true } __nextHasNoMarginBottom
checked={ value } checked={ value }
onChange={ onChange } onChange={ onChange }
label={ label } label={ label }

View file

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

View file

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

View file

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