2023-03-30 15:30:15 +03:00
|
|
|
import React, { Component } from 'react';
|
2023-03-29 12:54:56 +03:00
|
|
|
import { WithTranslation } from 'react-i18next';
|
2018-08-10 12:30:00 +02:00
|
|
|
|
|
|
|
|
/**
|
2021-11-04 22:10:43 +01:00
|
|
|
* {@code AbstractGoogleSignInButton} Component's property types.
|
2018-08-10 12:30:00 +02:00
|
|
|
*/
|
2023-03-29 12:54:56 +03:00
|
|
|
interface IProps extends WithTranslation {
|
2018-08-10 12:30:00 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The callback to invoke when the button is clicked.
|
|
|
|
|
*/
|
2023-03-30 15:30:15 +03:00
|
|
|
onClick: (e?: React.MouseEvent) => void;
|
2018-08-10 12:30:00 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* True if the user is signed in, so it needs to render a different label
|
|
|
|
|
* and maybe different style (for the future).
|
|
|
|
|
*/
|
2023-03-29 12:54:56 +03:00
|
|
|
signedIn?: boolean;
|
2023-03-30 15:30:15 +03:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The text to display within {@code GoogleSignInButton}.
|
|
|
|
|
*/
|
|
|
|
|
text?: string;
|
2023-03-29 12:54:56 +03:00
|
|
|
}
|
2018-08-10 12:30:00 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Abstract class of the {@code GoogleSignInButton} to share platform
|
|
|
|
|
* independent code.
|
|
|
|
|
*
|
|
|
|
|
* @inheritdoc
|
|
|
|
|
*/
|
2023-03-29 12:54:56 +03:00
|
|
|
export default class AbstractGoogleSignInButton extends Component<IProps> {
|
2018-08-10 12:30:00 +02:00
|
|
|
}
|