File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
packages/@react-oauth/google/src Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ $ npm install @react-oauth/google@latest
1212$ yarn add @react-oauth/google@latest
1313```
1414
15- ## Demo
15+ ## Demo & How to use to fetch user details
1616
1717https://react-oauth.vercel.app/
1818
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export type GoogleLoginProps = {
1717 onError ?: ( ) => void ;
1818 promptMomentNotification ?: MomentListener ;
1919 useOneTap ?: boolean ;
20+ containerProps ?: React . ComponentPropsWithoutRef < 'div' > ;
2021} & Omit < IdConfiguration , 'client_id' | 'callback' > &
2122 GsiButtonConfiguration ;
2223
@@ -34,6 +35,7 @@ export default function GoogleLogin({
3435 width,
3536 locale,
3637 click_listener,
38+ containerProps,
3739 ...props
3840} : GoogleLoginProps ) {
3941 const btnContainerRef = useRef < HTMLDivElement > ( null ) ;
@@ -102,6 +104,10 @@ export default function GoogleLogin({
102104 ] ) ;
103105
104106 return (
105- < div ref = { btnContainerRef } style = { { height : containerHeightMap [ size ] } } />
107+ < div
108+ { ...containerProps }
109+ ref = { btnContainerRef }
110+ style = { { height : containerHeightMap [ size ] , ...containerProps ?. style } }
111+ />
106112 ) ;
107113}
You can’t perform that action at this time.
0 commit comments