Skip to content

Commit ad40113

Browse files
frossortio
andauthored
update: subscription onboarding to use WP components (#10907)
Co-authored-by: Rafael Meneses <meneses.tio@gmail.com>
1 parent c8cbfca commit ad40113

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: update
3+
4+
update: subscription-product-onboarding to use WP components bundled within the WP installation

client/subscription-product-onboarding/modal.js

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import React from 'react';
66
import { Button } from 'wcpay/components/wp-components-wrapped/components/button';
77
import { Icon } from 'wcpay/components/wp-components-wrapped/components/icon';
88
import { Modal } from 'wcpay/components/wp-components-wrapped/components/modal';
9+
import { ExternalLink } from 'wcpay/components/wp-components-wrapped/components/external-link';
10+
import UnbundledWpComponentsProvider from 'wcpay/wordpress-components-context/unbundled-wp-components-provider';
911
import {
1012
createInterpolateElement,
1113
useEffect,
@@ -87,14 +89,7 @@ const SubscriptionProductOnboardingModalContent = ( {
8789
'woocommerce-payments'
8890
),
8991
{
90-
a: (
91-
// eslint-disable-next-line jsx-a11y/anchor-has-content
92-
<a
93-
href="https://wordpress.com/tos/"
94-
target="_blank"
95-
rel="noreferrer"
96-
/>
97-
),
92+
a: <ExternalLink href="https://wordpress.com/tos/" />,
9893
}
9994
) }
10095
</p>
@@ -135,11 +130,13 @@ const SubscriptionProductOnboardingModal = () => {
135130
}
136131

137132
return (
138-
<SubscriptionProductOnboardingModalContent
139-
onRequestClose={ () => {
140-
setOpen( false );
141-
} }
142-
/>
133+
<UnbundledWpComponentsProvider>
134+
<SubscriptionProductOnboardingModalContent
135+
onRequestClose={ () => {
136+
setOpen( false );
137+
} }
138+
/>
139+
</UnbundledWpComponentsProvider>
143140
);
144141
};
145142

client/subscription-product-onboarding/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
}
1111

1212
.components-modal__content {
13+
padding-top: 0;
1314
padding-bottom: 0;
1415
margin-top: 0;
1516

0 commit comments

Comments
 (0)