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
- 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
Describe the bug Button is rendered inconsistently when
buttonType: 'plain'is used. Sometimes it still tries to include card information which results inmin-width: 240pxrule breaking narrow layouts.To Reproduce Steps to reproduce the behavior:
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
buttonSizeModeandbuttonRadiushave no impact)Expected behavior Button respects passed parameters and doesn't try to render card info when
buttonType: 'plain'is usedScreenshots


Correctly rendered button
Incorrectly rendered button
Component information:
Reproducible with a plain SDK. Initially found it with
@google-pay/button-reacthowever I believe it is applicable to other component libraries@google-pay/button-react)Environment:
Additional information
As mentioned in #292 (comment), passing a deprecated
buttonType: 'short'works as expected