Make the toggle state name a bit more descriptive

This commit is contained in:
Daniel Dudzic 2024-12-17 11:56:38 +01:00
parent f32f30ef0a
commit 44e79f62c5
No known key found for this signature in database
GPG key ID: 31B40D33E3465483

View file

@ -5,7 +5,7 @@ import PaymentMethodIcon from '../PaymentMethodIcon';
import data from '../../../utils/data';
const PaymentMethodItemBlock = ( props ) => {
const [ isChecked, setIsChecked ] = useState( false );
const [ toggleIsChecked, setToggleIsChecked ] = useState( false );
const [ modalIsVisible, setModalIsVisible ] = useState( false );
const Modal = props?.modal;
@ -28,8 +28,8 @@ const PaymentMethodItemBlock = ( props ) => {
<div className="ppcp-r-settings-block__payment-methods__item__footer">
<ToggleControl
__nextHasNoMarginBottom={ true }
checked={ isChecked }
onChange={ setIsChecked }
checked={ toggleIsChecked }
onChange={ setToggleIsChecked }
/>
{ Modal && (
<div