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.

SpeakerStatsList.tsx 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* eslint-disable lines-around-comment */
  2. import { makeStyles } from '@material-ui/core/styles';
  3. import React from 'react';
  4. import { MOBILE_BREAKPOINT } from '../../constants';
  5. // @ts-ignore
  6. import abstractSpeakerStatsList from '../AbstractSpeakerStatsList';
  7. // @ts-ignore
  8. import SpeakerStatsItem from './SpeakerStatsItem';
  9. const useStyles = makeStyles((theme: any) => {
  10. return {
  11. list: {
  12. marginTop: `${theme.spacing(3)}px`,
  13. marginBottom: `${theme.spacing(3)}px`
  14. },
  15. item: {
  16. height: `${theme.spacing(7)}px`,
  17. [theme.breakpoints.down(MOBILE_BREAKPOINT)]: {
  18. height: `${theme.spacing(8)}px`
  19. }
  20. },
  21. avatar: {
  22. height: `${theme.spacing(5)}px`
  23. },
  24. expressions: {
  25. paddingLeft: 29
  26. },
  27. hasLeft: {
  28. color: theme.palette.text03
  29. },
  30. displayName: {
  31. ...theme.typography.bodyShortRegular,
  32. lineHeight: `${theme.typography.bodyShortRegular.lineHeight}px`,
  33. [theme.breakpoints.down(MOBILE_BREAKPOINT)]: {
  34. ...theme.typography.bodyShortRegularLarge,
  35. lineHeight: `${theme.typography.bodyShortRegular.lineHeightLarge}px`
  36. }
  37. },
  38. time: {
  39. padding: '2px 4px',
  40. borderRadius: '4px',
  41. ...theme.typography.labelBold,
  42. lineHeight: `${theme.typography.labelBold.lineHeight}px`,
  43. [theme.breakpoints.down(MOBILE_BREAKPOINT)]: {
  44. ...theme.typography.bodyShortRegularLarge,
  45. lineHeight: `${theme.typography.bodyShortRegular.lineHeightLarge}px`
  46. }
  47. },
  48. dominant: {
  49. backgroundColor: theme.palette.success02
  50. }
  51. };
  52. });
  53. /**
  54. * Component that renders the list of speaker stats.
  55. *
  56. * @returns {React$Element<any>}
  57. */
  58. const SpeakerStatsList = () => {
  59. const classes = useStyles();
  60. const items = abstractSpeakerStatsList(SpeakerStatsItem, classes);
  61. return (
  62. <div className = { classes.list }>
  63. {items}
  64. </div>
  65. );
  66. };
  67. export default SpeakerStatsList;