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.

KickButton.js 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import React, { Component } from 'react';
  2. import { translate } from '../../base/i18n';
  3. import RemoteVideoMenuButton from './RemoteVideoMenuButton';
  4. /**
  5. * Implements a React {@link Component} which displays a button for kicking out
  6. * a participant from the conference.
  7. *
  8. * @extends Component
  9. */
  10. class KickButton extends Component {
  11. /**
  12. * {@code KickButton} component's property types.
  13. *
  14. * @static
  15. */
  16. static propTypes = {
  17. /**
  18. * The callback to invoke when the component is clicked.
  19. */
  20. onClick: React.PropTypes.func,
  21. /**
  22. * The ID of the participant linked to the onClick callback.
  23. */
  24. participantID: React.PropTypes.string,
  25. /**
  26. * Invoked to obtain translated strings.
  27. */
  28. t: React.PropTypes.func
  29. };
  30. /**
  31. * Implements React's {@link Component#render()}.
  32. *
  33. * @inheritdoc
  34. * @returns {ReactElement}
  35. */
  36. render() {
  37. const { onClick, participantID, t } = this.props;
  38. return (
  39. <RemoteVideoMenuButton
  40. buttonText = { t('videothumbnail.kick') }
  41. iconClass = 'icon-kick'
  42. id = { `ejectlink_${participantID}` }
  43. onClick = { onClick } />
  44. );
  45. }
  46. }
  47. export default translate(KickButton);