Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ModeratorIndicator.js 1.1KB

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