mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
28 lines
554 B
JavaScript
28 lines
554 B
JavaScript
import { Button } from '@wordpress/components';
|
|
|
|
import SettingsBlock from '../SettingsBlock';
|
|
import { Action } from '../Elements';
|
|
|
|
const ControlButton = ( {
|
|
title,
|
|
description,
|
|
type = 'secondary',
|
|
isBusy,
|
|
onClick,
|
|
buttonLabel,
|
|
} ) => (
|
|
<SettingsBlock
|
|
title={ title }
|
|
headerDescription={ description }
|
|
horizontalLayout={ true }
|
|
className="ppcp--button-block"
|
|
>
|
|
<Action>
|
|
<Button isBusy={ isBusy } variant={ type } onClick={ onClick }>
|
|
{ buttonLabel }
|
|
</Button>
|
|
</Action>
|
|
</SettingsBlock>
|
|
);
|
|
|
|
export default ControlButton;
|