Skip to content

Commit

Permalink
fix(GooglePayButton): to pass buttonRadius to the createButton
Browse files Browse the repository at this point in the history
…function when the value is 0
  • Loading branch information
longyulongyu committed Dec 24, 2024
1 parent a650b9e commit b84b6a8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/empty-files-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@adyen/adyen-web': patch
---

Resolve the issue where `GooglePayButton` fails to pass `buttonRadius` to the `createButton` function when the value is 0.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const GooglePayButton = (props: GooglePayButtonProps) => {
buttonLocale,
buttonSizeMode,
buttonRootNode,
...(buttonRadius && { buttonRadius })
...(buttonRadius !== undefined && { buttonRadius })
})
)
.then(googlePayButton => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,13 @@ export const Express: GooglePayStory = {
},

// Shipping Options config
shippingOptionRequired: true
shippingOptionRequired: true,

// Button UI config
buttonColor: 'black',
buttonType: 'buy',
buttonSizeMode: 'fill',
buttonRadius: 0
}
}
};
Expand Down

0 comments on commit b84b6a8

Please sign in to comment.