mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
🚚 Move settings-controls into new subfolder
This commit is contained in:
parent
b9df4d06a4
commit
7f861c5825
19 changed files with 23 additions and 20 deletions
|
@ -0,0 +1,23 @@
|
|||
import { ToggleControl } from '@wordpress/components';
|
||||
import { Action, Description } from '../Elements';
|
||||
|
||||
const ControlToggleButton = ( { label, description, value, onChange } ) => {
|
||||
const descriptionContent = description ? (
|
||||
<Description>{ description }</Description>
|
||||
) : null;
|
||||
|
||||
return (
|
||||
<Action>
|
||||
<ToggleControl
|
||||
className="ppcp--control-toggle"
|
||||
__nextHasNoMarginBottom={ true }
|
||||
checked={ value }
|
||||
onChange={ onChange }
|
||||
label={ label }
|
||||
help={ descriptionContent }
|
||||
/>
|
||||
</Action>
|
||||
);
|
||||
};
|
||||
|
||||
export default ControlToggleButton;
|
Loading…
Add table
Add a link
Reference in a new issue