jiti-meet/react/features/filmstrip/components/web/RaisedHandIndicator.js

58 lines
1.3 KiB
JavaScript
Raw Normal View History

/* @flow */
2019-03-27 10:23:41 +00:00
import React from 'react';
import { connect } from '../../../base/redux';
import AbstractRaisedHandIndicator, {
type Props as AbstractProps,
_mapStateToProps
} from '../AbstractRaisedHandIndicator';
import BaseIndicator from './BaseIndicator';
/**
* The type of the React {@code Component} props of {@link RaisedHandIndicator}.
*/
2019-03-27 10:23:41 +00:00
type Props = AbstractProps & {
/**
* The font-size for the icon.
*/
iconSize: number,
/**
* From which side of the indicator the tooltip should appear from.
*/
tooltipPosition: string
};
/**
* Thumbnail badge showing that the participant would like to speak.
*
* @extends Component
*/
2019-03-27 10:23:41 +00:00
class RaisedHandIndicator extends AbstractRaisedHandIndicator<Props> {
/**
* Implements React's {@link Component#render()}.
*
* @inheritdoc
*/
render() {
2019-03-27 10:23:41 +00:00
if (!this.props._raisedHand) {
return null;
}
return (
<BaseIndicator
className = 'raisehandindicator indicator show-inline'
iconClassName = 'icon-raised-hand indicatoricon'
iconSize = { `${this.props.iconSize}px` }
tooltipKey = 'raisedHand'
tooltipPosition = { this.props.tooltipPosition } />
);
}
}
2019-03-27 10:23:41 +00:00
export default connect(_mapStateToProps)(RaisedHandIndicator);