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

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import React, { Component } from 'react';
  2. import BaseIndicator from './BaseIndicator';
  3. /**
  4. * React {@code Component} for showing a moderator icon with a tooltip.
  5. *
  6. * @extends Component
  7. */
  8. class ModeratorIndicator extends Component {
  9. /**
  10. * {@code ModeratorIndicator} component's property types.
  11. *
  12. * @static
  13. */
  14. static propTypes = {
  15. /**
  16. * From which side of the indicator the tooltip should appear from.
  17. */
  18. tooltipPosition: React.PropTypes.string
  19. };
  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. iconClassName = 'icon-star'
  32. tooltipKey = 'videothumbnail.moderator'
  33. tooltipPosition = { this.props.tooltipPosition } />
  34. </div>
  35. );
  36. }
  37. }
  38. export default ModeratorIndicator;