/* @flow */ import { makeStyles } from '@material-ui/core/styles'; import React from 'react'; import { useTranslation } from 'react-i18next'; import { Tooltip } from '../../../base/tooltip'; import { FACIAL_EXPRESSION_EMOJIS } from '../../../facial-recognition/constants.js'; const useStyles = makeStyles(theme => { return { labels: { padding: '22px 0 7px 0', height: 20 }, emojis: { paddingLeft: 27, ...theme.typography.bodyShortRegularLarge, lineHeight: `${theme.typography.bodyShortRegular.lineHeightLarge}px` } }; }); /** * The type of the React {@code Component} props of {@link SpeakerStatsLabels}. */ type Props = { /** * True if the facial recognition is not disabled. */ showFacialExpressions: boolean, }; const SpeakerStatsLabels = (props: Props) => { const { t } = useTranslation(); const classes = useStyles(); const FacialExpressionsLabels = () => Object.keys(FACIAL_EXPRESSION_EMOJIS).map( expression => (
{ FACIAL_EXPRESSION_EMOJIS[expression] }
) ); const nameTimeClass = `name-time${ props.showFacialExpressions ? ' name-time_expressions-on' : '' }`; return (
{ t('speakerStats.name') }
{ t('speakerStats.speakerTime') }
{ props.showFacialExpressions &&
}
); }; export default SpeakerStatsLabels;