import React from 'react'; import { useTranslation } from 'react-i18next'; import { makeStyles } from 'tss-react/mui'; import { withPixelLineHeight } from '../../../base/styles/functions.web'; // eslint-disable-next-line lines-around-comment // @ts-ignore import { Tooltip } from '../../../base/tooltip'; import { FACE_EXPRESSIONS_EMOJIS } from '../../../face-landmarks/constants'; const useStyles = makeStyles()(theme => { return { labels: { padding: '22px 0 7px 0', height: 20 }, emojis: { paddingLeft: 27, ...withPixelLineHeight(theme.typography.bodyShortRegularLarge) } }; }); /** * The type of the React {@code Component} props of {@link SpeakerStatsLabels}. */ interface IProps { /** * True if the face expressions detection is not disabled. */ showFaceExpressions: boolean; } const SpeakerStatsLabels = (props: IProps) => { const { t } = useTranslation(); const { classes } = useStyles(); const nameTimeClass = `name-time${ props.showFaceExpressions ? ' name-time_expressions-on' : '' }`; return (
{ t('speakerStats.name') }
{ t('speakerStats.speakerTime') }
{ props.showFaceExpressions &&
{Object.keys(FACE_EXPRESSIONS_EMOJIS).map( expression => (
{FACE_EXPRESSIONS_EMOJIS[expression as keyof typeof FACE_EXPRESSIONS_EMOJIS]}
) )}
}
); }; export default SpeakerStatsLabels;