💄 Improve webhook details in Troubleshooting tab

This commit is contained in:
Philipp Stracker 2025-01-28 10:47:22 +01:00
parent d09e48df77
commit 4a611cf3b4
No known key found for this signature in database
5 changed files with 28 additions and 2 deletions

View file

@ -38,6 +38,8 @@ button.components-button, a.components-button {
/* style the button template */
text-align: center;
&:not(:disabled) {
@extend %button-style-default;
}

View file

@ -7,3 +7,25 @@
--block-header-gap: 0;
--block-separator-size: 0;
}
.ppcp--webhooks {
.ppcp--webhook-list li {
list-style: none;
&::before {
content: '✔︎';
opacity: 0.35;
font-size: 0.75em;
line-height: 1.35;
display: inline-block;
margin-right: 8px;
}
}
}
.ppcp--webhook-resubscribe,
.ppcp--webhook-simulation {
.ppcp--action .components-button {
min-width: 160px;
display: block;
}
}

View file

@ -13,7 +13,7 @@ const HooksListBlock = () => {
}
return (
<SettingsBlock separatorAndGap={ false }>
<SettingsBlock separatorAndGap={ false } className="ppcp--webhooks">
<WebhookUrl url={ url } />
<WebhookEvents events={ events } />
</SettingsBlock>
@ -37,7 +37,7 @@ const WebhookEvents = ( { events } ) => {
<Title>
{ __( 'Subscribed Events', 'woocommerce-paypal-payments' ) }
</Title>
<ul>
<ul className="ppcp--webhook-list">
{ events.map( ( event, index ) => (
<li key={ index }>{ event }</li>
) ) }

View file

@ -59,6 +59,7 @@ const ResubscribeBlock = () => {
'woocommerce-paypal-payments'
) }
horizontalLayout={ true }
className="ppcp--webhook-resubscribe"
>
<ControlButton
type={ 'secondary' }

View file

@ -116,6 +116,7 @@ const SimulationBlock = () => {
'woocommerce-paypal-payments'
) }
horizontalLayout={ true }
className="ppcp--webhook-simulation"
>
<ControlButton
type={ 'secondary' }