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.

Toolbar.tsx 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import React, { Component } from 'react';
  2. import AudioMuteButton from './AudioMuteButton';
  3. import HangupButton from './HangupButton';
  4. import VideoMuteButton from './VideoMuteButton';
  5. /**
  6. * The type of the React {@code Component} props of {@link Toolbar}.
  7. */
  8. interface IProps {
  9. /**
  10. * Additional CSS class names to add to the root of the toolbar.
  11. */
  12. className: string;
  13. /**
  14. * Callback invoked when no longer moused over the toolbar.
  15. */
  16. onMouseOut: (e?: React.MouseEvent) => void;
  17. /**
  18. * Callback invoked when the mouse has moved over the toolbar.
  19. */
  20. onMouseOver: (e?: React.MouseEvent) => void;
  21. }
  22. /**
  23. * Represents the toolbar in the Always On Top window.
  24. *
  25. * @augments Component
  26. */
  27. export default class Toolbar extends Component<IProps> {
  28. /**
  29. * Implements React's {@link Component#render()}.
  30. *
  31. * @inheritdoc
  32. * @returns {ReactElement}
  33. */
  34. render() {
  35. const {
  36. className = '',
  37. onMouseOut,
  38. onMouseOver
  39. } = this.props;
  40. return (
  41. <div
  42. className = { `toolbox-content-items always-on-top-toolbox ${className}` }
  43. onMouseOut = { onMouseOut }
  44. onMouseOver = { onMouseOver }>
  45. <AudioMuteButton />
  46. <VideoMuteButton />
  47. <HangupButton customClass = 'hangup-button' />
  48. </div>
  49. );
  50. }
  51. }