diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 67f10f6ba2b9..749e3689cae0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1209,6 +1209,9 @@ importers: '@wordpress/i18n': specifier: 6.19.0 version: 6.19.0 + '@wordpress/ui': + specifier: 0.11.0 + version: 0.11.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) clsx: specifier: 2.1.1 version: 2.1.1 diff --git a/projects/js-packages/partner-coupon/changelog/migrate-actionbutton-to-wp-ui b/projects/js-packages/partner-coupon/changelog/migrate-actionbutton-to-wp-ui new file mode 100644 index 000000000000..adf672e90732 --- /dev/null +++ b/projects/js-packages/partner-coupon/changelog/migrate-actionbutton-to-wp-ui @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Partner Coupon: Migrate ActionButton to @wordpress/ui Button; brings the package to zero ActionButton imports. diff --git a/projects/js-packages/partner-coupon/components/redeem-partner-coupon-post-connection/index.jsx b/projects/js-packages/partner-coupon/components/redeem-partner-coupon-post-connection/index.jsx index 0f39a96193f4..75df296e292a 100644 --- a/projects/js-packages/partner-coupon/components/redeem-partner-coupon-post-connection/index.jsx +++ b/projects/js-packages/partner-coupon/components/redeem-partner-coupon-post-connection/index.jsx @@ -1,5 +1,6 @@ -import { ActionButton, JetpackLogo } from '@automattic/jetpack-components'; +import { JetpackLogo } from '@automattic/jetpack-components'; import { __, sprintf } from '@wordpress/i18n'; +import { Button } from '@wordpress/ui'; import PropTypes from 'prop-types'; import { useCallback, useState } from 'react'; import { usePartnerCouponRedemption } from '../../hooks.js'; @@ -127,14 +128,13 @@ const RedeemPartnerCouponPostConnection = props => {
- + { sprintf( /* translators: %s: Name of a Jetpack product. */ __( 'Redeem %s', 'jetpack-partner-coupon' ), partnerCoupon.product.title ) } - onClick={ onClick } - /> +
) }
diff --git a/projects/js-packages/partner-coupon/package.json b/projects/js-packages/partner-coupon/package.json index 7d218284d656..5a2488678aaa 100644 --- a/projects/js-packages/partner-coupon/package.json +++ b/projects/js-packages/partner-coupon/package.json @@ -26,6 +26,7 @@ "@automattic/jetpack-components": "workspace:*", "@automattic/jetpack-connection": "workspace:*", "@wordpress/i18n": "6.19.0", + "@wordpress/ui": "0.11.0", "clsx": "2.1.1", "prop-types": "15.8.1" },