Merge pull request #3029 from woocommerce/PCP-4135-fix-js-error-button-is-not-defined

Fix JS error "Button is not defined" (4135)
This commit is contained in:
Emili Castells 2025-01-28 13:40:24 +01:00 committed by GitHub
commit 5b212879d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 13 deletions

View file

@ -1,4 +1,5 @@
import { ToggleControl } from '@wordpress/components';
import { ToggleControl, Icon, Button } from '@wordpress/components';
import { cog } from '@wordpress/icons';
import SettingsBlock from '../SettingsBlock';
import PaymentMethodIcon from '../PaymentMethodIcon';
@ -13,12 +14,12 @@ const PaymentMethodItemBlock = ( {
<SettingsBlock className="ppcp--method-item" separatorAndGap={ false }>
<div className="ppcp--method-inner">
<div className="ppcp--method-title-wrapper">
{ paymentMethod?.icon && (
<PaymentMethodIcon
icons={ [ paymentMethod.icon ] }
type={ paymentMethod.icon }
/>
) }
{ paymentMethod?.icon && (
<PaymentMethodIcon
icons={ [ paymentMethod.icon ] }
type={ paymentMethod.icon }
/>
) }
<span className="ppcp--method-title">
{ paymentMethod.itemTitle }
</span>
@ -28,7 +29,7 @@ const PaymentMethodItemBlock = ( {
</p>
<div className="ppcp--method-footer">
<ToggleControl
__nextHasNoMarginBottom={ true }
__nextHasNoMarginBottom
checked={ isSelected }
onChange={ onSelect }
/>