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.

JoinButton.web.js 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // @flow
  2. import Button from '@atlaskit/button';
  3. import React, { Component } from 'react';
  4. import Tooltip from '@atlaskit/tooltip';
  5. import { translate } from '../../base/i18n';
  6. /**
  7. * The type of the React {@code Component} props of {@link JoinButton}.
  8. */
  9. type Props = {
  10. /**
  11. * The function called when the button is pressed.
  12. */
  13. onPress: Function,
  14. /**
  15. * Invoked to obtain translated strings.
  16. */
  17. t: Function
  18. };
  19. /**
  20. * A React Component for joining an existing calendar meeting.
  21. *
  22. * @extends Component
  23. */
  24. class JoinButton extends Component<Props> {
  25. /**
  26. * Implements React's {@link Component#render}.
  27. *
  28. * @inheritdoc
  29. */
  30. render() {
  31. const { onPress, t } = this.props;
  32. return (
  33. <Tooltip
  34. content = { t('calendarSync.joinTooltip') }>
  35. <Button
  36. appearance = 'primary'
  37. className = 'join-button'
  38. onClick = { onPress }
  39. type = 'button'>
  40. { t('calendarSync.join') }
  41. </Button>
  42. </Tooltip>
  43. );
  44. }
  45. }
  46. export default translate(JoinButton);