mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 12:25:15 +08:00
💄 Improve UI of webhook section
This commit is contained in:
parent
406e8ebc98
commit
1c33c42507
3 changed files with 21 additions and 20 deletions
|
@ -1,6 +1,9 @@
|
|||
import { __ } from '@wordpress/i18n';
|
||||
import { CommonHooks } from '../../../../../../data';
|
||||
import { Title } from '../../../../../ReusableComponents/SettingsBlocks';
|
||||
import {
|
||||
SettingsBlock,
|
||||
Title,
|
||||
} from '../../../../../ReusableComponents/SettingsBlocks';
|
||||
|
||||
const HooksTableBlock = () => {
|
||||
const { webhooks } = CommonHooks.useWebhooks();
|
||||
|
@ -11,10 +14,10 @@ const HooksTableBlock = () => {
|
|||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<SettingsBlock separatorAndGap={ false }>
|
||||
<WebhookUrl url={ url } />
|
||||
<WebhookEvents events={ events } />
|
||||
</>
|
||||
</SettingsBlock>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@ const ResubscribeBlock = () => {
|
|||
'Click to remove the current webhook subscription and subscribe again, for example, if the website domain or URL structure changed.',
|
||||
'woocommerce-paypal-payments'
|
||||
) }
|
||||
separatorAndGap={ false }
|
||||
actionProps={ {
|
||||
buttonType: 'secondary',
|
||||
isBusy: resubscribing,
|
||||
|
|
|
@ -107,23 +107,20 @@ const SimulationBlock = () => {
|
|||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<ButtonSettingsBlock
|
||||
title={ __(
|
||||
'Simulate webhooks',
|
||||
'woocommerce-paypal-payments'
|
||||
) }
|
||||
actionProps={ {
|
||||
buttonType: 'secondary',
|
||||
isBusy: simulating,
|
||||
callback: () => startSimulation( 30 ),
|
||||
value: __(
|
||||
'Simulate webhooks',
|
||||
'woocommerce-paypal-payments'
|
||||
),
|
||||
} }
|
||||
/>
|
||||
</>
|
||||
<ButtonSettingsBlock
|
||||
title={ __( 'Test webhooks', 'woocommerce-paypal-payments' ) }
|
||||
description={ __(
|
||||
'Send a test-webhook from PayPal to confirm that webhooks are being received and processed correctly.',
|
||||
'woocommerce-paypal-payments'
|
||||
) }
|
||||
separatorAndGap={ false }
|
||||
actionProps={ {
|
||||
buttonType: 'secondary',
|
||||
isBusy: simulating,
|
||||
callback: () => startSimulation( 30 ),
|
||||
value: __( 'Simulate webhooks', 'woocommerce-paypal-payments' ),
|
||||
} }
|
||||
/>
|
||||
);
|
||||
};
|
||||
export default SimulationBlock;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue