2018-10-30 05:02:23 +00:00
|
|
|
/* @flow */
|
|
|
|
|
2017-07-10 22:29:44 +00:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
2017-06-19 16:01:44 +00:00
|
|
|
import BaseIndicator from './BaseIndicator';
|
|
|
|
|
|
|
|
/**
|
2018-10-30 05:02:23 +00:00
|
|
|
* The type of the React {@code Component} props of {@link ModeratorIndicator}.
|
2017-06-19 16:01:44 +00:00
|
|
|
*/
|
2018-10-30 05:02:23 +00:00
|
|
|
type Props = {
|
|
|
|
|
2017-08-15 22:14:49 +00:00
|
|
|
/**
|
2018-10-30 05:02:23 +00:00
|
|
|
* From which side of the indicator the tooltip should appear from.
|
2017-08-15 22:14:49 +00:00
|
|
|
*/
|
2018-10-30 05:02:23 +00:00
|
|
|
tooltipPosition: string
|
|
|
|
};
|
2017-08-15 22:14:49 +00:00
|
|
|
|
2018-10-30 05:02:23 +00:00
|
|
|
/**
|
|
|
|
* React {@code Component} for showing a moderator icon with a tooltip.
|
|
|
|
*
|
|
|
|
* @extends Component
|
|
|
|
*/
|
|
|
|
class ModeratorIndicator extends Component<Props> {
|
2017-06-19 16:01:44 +00:00
|
|
|
/**
|
2017-07-10 22:29:44 +00:00
|
|
|
* Implements React's {@link Component#render()}.
|
2017-06-19 16:01:44 +00:00
|
|
|
*
|
2017-07-10 22:29:44 +00:00
|
|
|
* @inheritdoc
|
|
|
|
* @returns {ReactElement}
|
2017-06-19 16:01:44 +00:00
|
|
|
*/
|
2017-07-10 22:29:44 +00:00
|
|
|
render() {
|
|
|
|
return (
|
2017-08-15 22:14:49 +00:00
|
|
|
<div className = 'moderator-icon right'>
|
|
|
|
<BaseIndicator
|
|
|
|
className = 'focusindicator toolbar-icon'
|
|
|
|
iconClassName = 'icon-star'
|
|
|
|
tooltipKey = 'videothumbnail.moderator'
|
|
|
|
tooltipPosition = { this.props.tooltipPosition } />
|
|
|
|
</div>
|
2017-07-10 22:29:44 +00:00
|
|
|
);
|
2017-06-19 16:01:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ModeratorIndicator;
|