mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Conditionally check/uncheck the Order Intent
This commit is contained in:
parent
5059ca24ff
commit
167e12e54e
2 changed files with 16 additions and 1 deletions
|
@ -1,7 +1,13 @@
|
|||
import { ToggleControl } from '@wordpress/components';
|
||||
import { Action, Description } from '../Elements';
|
||||
|
||||
const ControlToggleButton = ( { label, description, value, onChange } ) => (
|
||||
const ControlToggleButton = ( {
|
||||
label,
|
||||
description,
|
||||
value,
|
||||
onChange,
|
||||
disabled = false,
|
||||
} ) => (
|
||||
<Action>
|
||||
<ToggleControl
|
||||
className="ppcp--control-toggle"
|
||||
|
@ -12,6 +18,7 @@ const ControlToggleButton = ( { label, description, value, onChange } ) => (
|
|||
help={
|
||||
description ? <Description>{ description }</Description> : null
|
||||
}
|
||||
disabled={ disabled }
|
||||
/>
|
||||
</Action>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue