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.

MicrosoftSignInButton.web.js 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // @flow
  2. import React, { Component } from 'react';
  3. /**
  4. * The type of the React {@code Component} props of
  5. * {@link MicrosoftSignInButton}.
  6. */
  7. type Props = {
  8. // The callback to invoke when {@code MicrosoftSignInButton} is clicked.
  9. onClick: Function,
  10. // The text to display within {@code MicrosoftSignInButton}.
  11. text: string
  12. };
  13. /**
  14. * A React Component showing a button to sign in with Microsoft.
  15. *
  16. * @extends Component
  17. */
  18. export default class MicrosoftSignInButton extends Component<Props> {
  19. /**
  20. * Implements React's {@link Component#render()}.
  21. *
  22. * @inheritdoc
  23. * @returns {ReactElement}
  24. */
  25. render() {
  26. return (
  27. <div
  28. className = 'microsoft-sign-in'
  29. onClick = { this.props.onClick }>
  30. <img
  31. className = 'microsoft-logo'
  32. src = 'images/microsoftLogo.svg' />
  33. <div className = 'microsoft-cta'>
  34. { this.props.text }
  35. </div>
  36. </div>
  37. );
  38. }
  39. }