Skip to content

Commit cb2a8ce

Browse files
authored
fix: allow width to be string or number for google login button (#278)
1 parent 244d2b9 commit cb2a8ce

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.changeset/gentle-camels-jam.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@react-oauth/google': patch
3+
---
4+
5+
allow width to be string or number for google login button

packages/@react-oauth/google/src/types/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export interface GsiButtonConfiguration {
8585
/** The Google [logo alignment](https://developers.google.com/identity/gsi/web/reference/js-reference#logo_alignment): left or center */
8686
logo_alignment?: 'left' | 'center';
8787
/** The button [width](https://developers.google.com/identity/gsi/web/reference/js-reference#width), in pixels */
88-
width?: string;
88+
width?: string | number;
8989
/** If set, then the button [language](https://developers.google.com/identity/gsi/web/reference/js-reference#locale) is rendered */
9090
locale?: string;
9191
/** If set, this [function](https://developers.google.com/identity/gsi/web/reference/js-reference#click_listener) will be called when the Sign in with Google button is clicked. */
@@ -184,11 +184,11 @@ export interface TokenClientConfig {
184184
scope: string;
185185

186186
/**
187-
* Optional, defaults to true. Enables applications to use incremental authorization to
188-
* request access to additional scopes in context. If you set this parameter's value to
189-
* false and the authorization request is granted, then the new access token will only
190-
* cover any scopes to which the scope requested in this TokenClientConfig.
191-
*/
187+
* Optional, defaults to true. Enables applications to use incremental authorization to
188+
* request access to additional scopes in context. If you set this parameter's value to
189+
* false and the authorization request is granted, then the new access token will only
190+
* cover any scopes to which the scope requested in this TokenClientConfig.
191+
*/
192192
include_granted_scopes?: boolean;
193193

194194
/**
@@ -302,7 +302,7 @@ export interface CodeClientConfig {
302302
/**
303303
* Optional, defaults to true. Enables applications to use incremental authorization to
304304
* request access to additional scopes in context. If you set this parameter's value to
305-
* false and the authorization request is granted, then the new access token will only
305+
* false and the authorization request is granted, then the new access token will only
306306
* cover any scopes to which the scope requested in this CodeClientConfig.
307307
*/
308308
include_granted_scopes?: boolean;

0 commit comments

Comments
 (0)