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.

ModeratorIndicator.js 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* @flow */
  2. import React, { Component } from 'react';
  3. import BaseIndicator from './BaseIndicator';
  4. /**
  5. * The type of the React {@code Component} props of {@link ModeratorIndicator}.
  6. */
  7. type Props = {
  8. /**
  9. * From which side of the indicator the tooltip should appear from.
  10. */
  11. tooltipPosition: string
  12. };
  13. /**
  14. * React {@code Component} for showing a moderator icon with a tooltip.
  15. *
  16. * @extends Component
  17. */
  18. class ModeratorIndicator extends Component<Props> {
  19. /**
  20. * Implements React's {@link Component#render()}.
  21. *
  22. * @inheritdoc
  23. * @returns {ReactElement}
  24. */
  25. render() {
  26. return (
  27. <div className = 'moderator-icon right'>
  28. <BaseIndicator
  29. className = 'focusindicator toolbar-icon'
  30. iconClassName = 'icon-star'
  31. tooltipKey = 'videothumbnail.moderator'
  32. tooltipPosition = { this.props.tooltipPosition } />
  33. </div>
  34. );
  35. }
  36. }
  37. export default ModeratorIndicator;