Skip to content

Commit

Permalink
Update express checkout max button height to 55px (#9117)
Browse files Browse the repository at this point in the history
  • Loading branch information
bborman22 authored Jul 19, 2024
1 parent ad90644 commit 12ce9c7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions changelog/update-9006-express-checkout-button-height
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: update

Set express checkout max button height to 55px
2 changes: 1 addition & 1 deletion client/checkout/woopay/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@

&[data-size='large'] {
font-size: 13px;
height: 56px;
height: 55px;

svg {
top: 3px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const buttonSizeOptions = [
{
label: makeButtonSizeText(
__(
'Large {{helpText}}(56 px){{/helpText}}',
'Large {{helpText}}(55 px){{/helpText}}',
'woocommerce-payments'
)
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { ExpressCheckoutPreviewComponent } from 'wcpay/express-checkout/blocks/c
const buttonSizeToPxMap = {
small: 40,
medium: 48,
large: 56,
large: 55,
};

const WooPayButtonPreview = ( { size, buttonType, theme, radius } ) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ describe( 'PaymentRequestSettings', () => {
expect.anything()
);

userEvent.click( screen.getByLabelText( 'Large (56 px)' ) );
userEvent.click( screen.getByLabelText( 'Large (55 px)' ) );
expect( setButtonSizeMock ).toHaveBeenCalledWith( 'large' );
} );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public function get_button_height() {
}

if ( 'large' === $height ) {
return '56';
return '55';
}

// for the "default"/"small" and "catch-all" scenarios.
Expand Down

0 comments on commit 12ce9c7

Please sign in to comment.