mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +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 { __ } from '@wordpress/i18n';
|
||||||
import { CommonHooks } from '../../../../../../data';
|
import { CommonHooks } from '../../../../../../data';
|
||||||
import { Title } from '../../../../../ReusableComponents/SettingsBlocks';
|
import {
|
||||||
|
SettingsBlock,
|
||||||
|
Title,
|
||||||
|
} from '../../../../../ReusableComponents/SettingsBlocks';
|
||||||
|
|
||||||
const HooksTableBlock = () => {
|
const HooksTableBlock = () => {
|
||||||
const { webhooks } = CommonHooks.useWebhooks();
|
const { webhooks } = CommonHooks.useWebhooks();
|
||||||
|
@ -11,10 +14,10 @@ const HooksTableBlock = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<SettingsBlock separatorAndGap={ false }>
|
||||||
<WebhookUrl url={ url } />
|
<WebhookUrl url={ url } />
|
||||||
<WebhookEvents events={ events } />
|
<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.',
|
'Click to remove the current webhook subscription and subscribe again, for example, if the website domain or URL structure changed.',
|
||||||
'woocommerce-paypal-payments'
|
'woocommerce-paypal-payments'
|
||||||
) }
|
) }
|
||||||
|
separatorAndGap={ false }
|
||||||
actionProps={ {
|
actionProps={ {
|
||||||
buttonType: 'secondary',
|
buttonType: 'secondary',
|
||||||
isBusy: resubscribing,
|
isBusy: resubscribing,
|
||||||
|
|
|
@ -107,23 +107,20 @@ const SimulationBlock = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<ButtonSettingsBlock
|
||||||
<ButtonSettingsBlock
|
title={ __( 'Test webhooks', 'woocommerce-paypal-payments' ) }
|
||||||
title={ __(
|
description={ __(
|
||||||
'Simulate webhooks',
|
'Send a test-webhook from PayPal to confirm that webhooks are being received and processed correctly.',
|
||||||
'woocommerce-paypal-payments'
|
'woocommerce-paypal-payments'
|
||||||
) }
|
) }
|
||||||
actionProps={ {
|
separatorAndGap={ false }
|
||||||
buttonType: 'secondary',
|
actionProps={ {
|
||||||
isBusy: simulating,
|
buttonType: 'secondary',
|
||||||
callback: () => startSimulation( 30 ),
|
isBusy: simulating,
|
||||||
value: __(
|
callback: () => startSimulation( 30 ),
|
||||||
'Simulate webhooks',
|
value: __( 'Simulate webhooks', 'woocommerce-paypal-payments' ),
|
||||||
'woocommerce-paypal-payments'
|
} }
|
||||||
),
|
/>
|
||||||
} }
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export default SimulationBlock;
|
export default SimulationBlock;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue