mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
🔥 Clean up ControlButton
This commit is contained in:
parent
420437d55a
commit
b9df4d06a4
1 changed files with 5 additions and 15 deletions
|
@ -1,28 +1,18 @@
|
|||
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>
|
||||
<Action>
|
||||
<Button isBusy={ isBusy } variant={ type } onClick={ onClick }>
|
||||
{ buttonLabel }
|
||||
</Button>
|
||||
</Action>
|
||||
);
|
||||
|
||||
export default ControlButton;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue