You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SpeakerStatsLabels.tsx 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import React from 'react';
  2. import { useTranslation } from 'react-i18next';
  3. import { makeStyles } from 'tss-react/mui';
  4. import TimelineAxis from './TimelineAxis';
  5. const useStyles = makeStyles()(theme => {
  6. return {
  7. labels: {
  8. padding: '22px 0 7px 0',
  9. height: 20,
  10. '& .avatar-placeholder': {
  11. width: '32px',
  12. marginRight: theme.spacing(3)
  13. }
  14. }
  15. };
  16. });
  17. /**
  18. * The type of the React {@code Component} props of {@link SpeakerStatsLabels}.
  19. */
  20. interface IProps {
  21. /**
  22. * True if the face expressions detection is not disabled.
  23. */
  24. showFaceExpressions: boolean;
  25. }
  26. const SpeakerStatsLabels = (props: IProps) => {
  27. const { t } = useTranslation();
  28. const { classes } = useStyles();
  29. const nameTimeClass = `name-time${
  30. props.showFaceExpressions ? ' expressions-on' : ''
  31. }`;
  32. return (
  33. <div className = { `row ${classes.labels}` }>
  34. <div className = 'avatar-placeholder' />
  35. <div className = { nameTimeClass }>
  36. <div>
  37. { t('speakerStats.name') }
  38. </div>
  39. <div>
  40. { t('speakerStats.speakerTime') }
  41. </div>
  42. </div>
  43. {props.showFaceExpressions && <TimelineAxis />}
  44. </div>
  45. );
  46. };
  47. export default SpeakerStatsLabels;