Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Partner Coupon: Migrate ActionButton to @wordpress/ui Button; brings the package to zero ActionButton imports.
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -127,14 +128,13 @@ const RedeemPartnerCouponPostConnection = props => {

<div className="jetpack-redeem-partner-coupon-post-connection__actions">
<div>
<ActionButton
label={ sprintf(
<Button onClick={ onClick }>
{ sprintf(
/* translators: %s: Name of a Jetpack product. */
__( 'Redeem %s', 'jetpack-partner-coupon' ),
partnerCoupon.product.title
) }
onClick={ onClick }
/>
</Button>
</div>
<div>
<button
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ActionButton } from '@automattic/jetpack-components';
import { ConnectScreen } from '@automattic/jetpack-connection';
import { __, sprintf } from '@wordpress/i18n';
import { Button } from '@wordpress/ui';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import { usePartnerCouponRedemption } from '../../hooks.js';
Expand Down Expand Up @@ -74,14 +74,13 @@ const RedeemPartnerCouponPreConnection = props => {
) ) }
</ul>
{ connectionStatus.hasConnectedOwner && (
<ActionButton
label={ sprintf(
<Button onClick={ onClick }>
{ sprintf(
/* translators: %s: Name of a Jetpack product. */
__( 'Redeem %s', 'jetpack-partner-coupon' ),
partnerCoupon.product.title
) }
onClick={ onClick }
/>
</Button>
) }
</ConnectScreen>
</div>
Expand Down
1 change: 1 addition & 0 deletions projects/js-packages/partner-coupon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
Loading