You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GoogleSignInButton.web.js 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // @flow
  2. import React from 'react';
  3. import { translate } from '../../base/i18n';
  4. import AbstractGoogleSignInButton from './AbstractGoogleSignInButton';
  5. /**
  6. * A React Component showing a button to sign in with Google.
  7. *
  8. * @extends Component
  9. */
  10. class GoogleSignInButton extends AbstractGoogleSignInButton {
  11. /**
  12. * Implements React's {@link Component#render()}.
  13. *
  14. * @inheritdoc
  15. * @returns {ReactElement}
  16. */
  17. render() {
  18. const { t } = this.props;
  19. return (
  20. <div
  21. className = 'google-sign-in'
  22. onClick = { this.props.onClick }>
  23. <img
  24. className = 'google-logo'
  25. src = 'images/googleLogo.svg' />
  26. <div className = 'google-cta'>
  27. {
  28. t(this.props.signedIn
  29. ? 'liveStreaming.signOut'
  30. : 'liveStreaming.signIn')
  31. }
  32. </div>
  33. </div>
  34. );
  35. }
  36. }
  37. export default translate(GoogleSignInButton);