mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
19 lines
478 B
JavaScript
19 lines
478 B
JavaScript
import { ToggleControl } from '@wordpress/components';
|
|
import { Action, Description } from '../Elements';
|
|
|
|
const ControlToggleButton = ( { label, description, value, onChange } ) => (
|
|
<Action>
|
|
<ToggleControl
|
|
className="ppcp--control-toggle"
|
|
__nextHasNoMarginBottom
|
|
checked={ value }
|
|
onChange={ onChange }
|
|
label={ label }
|
|
help={
|
|
description ? <Description>{ description }</Description> : null
|
|
}
|
|
/>
|
|
</Action>
|
|
);
|
|
|
|
export default ControlToggleButton;
|