-
Notifications
You must be signed in to change notification settings - Fork 83
Description
Describe the bug Button is rendered inconsistently when buttonType: 'plain' is used. Sometimes it still tries to include card information which results in min-width: 240px rule breaking narrow layouts.
To Reproduce Steps to reproduce the behavior:
- Open Chrome in incognito mode
- Go to modified jsfiddle Basic Example
- Observe a cut GPay button
3.1 If button is rendered correctly, try to reload page a few times
3.2 Alternatively, try to open a url with Android Chrome - the issue is always reproducible there
Parameters used to render the button (though it feels like buttonSizeMode and buttonRadius have no impact)
buttonSizeMode: 'fill',
buttonType: 'plain',
buttonRadius: 9999,Expected behavior Button respects passed parameters and doesn't try to render card info when buttonType: 'plain' is used
Screenshots
Correctly rendered button

Incorrectly rendered button

Component information:
Reproducible with a plain SDK. Initially found it with @google-pay/button-react however I believe it is applicable to other component libraries
- Component
- React component (
@google-pay/button-react)
- React component (
- Component version (e.g. 1.0.0): 3.1.0
Environment:
- Device: MacBook Pro M1 2021, Pixel 6 Pro
- OS: MacOS 14.5, Android 14
- Browser: Chrome MacOS 126, Safari MacOS 17.5, Chrome Android 126
- Country/region: UK
Additional information
As mentioned in #292 (comment), passing a deprecated buttonType: 'short' works as expected