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.1KB

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