Skip to content

Commit 1d41857

Browse files
authored
🤖 Merge PR DefinitelyTyped#73450 [googlepay] add buttonBorderType property to the ButtonOptions object by @dmengelt
1 parent 85d3e03 commit 1d41857

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

‎types/googlepay/googlepay-tests.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ function addGooglePayButton() {
155155
buttonOptions.buttonLocale = "qw";
156156
buttonOptions.buttonLocale = "zh";
157157

158+
buttonOptions.buttonBorderType = "default_border";
159+
buttonOptions.buttonBorderType = "no_border";
160+
158161
const client = getGooglePaymentsClient();
159162
const button = client.createButton(buttonOptions);
160163
document.appendChild(document.createElement("div").appendChild(button));

‎types/googlepay/index.d.ts‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,6 +1855,15 @@ declare namespace google.payments.api {
18551855
*/
18561856
buttonLocale?: string;
18571857

1858+
/**
1859+
* Specifies the border types for the Google Pay button.
1860+
*
1861+
* If omitted, defaults to `default_border`.
1862+
*
1863+
* @default "default_border"
1864+
*/
1865+
buttonBorderType?: ButtonBorderType | undefined;
1866+
18581867
/**
18591868
* List of allowed payment methods.
18601869
*
@@ -2154,6 +2163,21 @@ declare namespace google.payments.api {
21542163
| "long"
21552164
| "short";
21562165

2166+
/**
2167+
* Supported border types for the Google Pay button.
2168+
*
2169+
* Options:
2170+
*
2171+
* - `no_border`:
2172+
* "No border is displayed around the button.
2173+
*
2174+
* - `default_border`:
2175+
* "A thin border is displayed around the button. (default).
2176+
*/
2177+
type ButtonBorderType =
2178+
| "no_border"
2179+
| "default_border";
2180+
21572181
/**
21582182
* Supported methods for controlling the size of the Google Pay button.
21592183
*

0 commit comments

Comments
 (0)