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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import React from 'react';
  2. import { makeStyles } from 'tss-react/mui';
  3. import { withPixelLineHeight } from '../../../base/styles/functions.web';
  4. import { MOBILE_BREAKPOINT } from '../../constants';
  5. import abstractSpeakerStatsList from '../AbstractSpeakerStatsList';
  6. import SpeakerStatsItem from './SpeakerStatsItem';
  7. const useStyles = makeStyles()(theme => {
  8. return {
  9. list: {
  10. paddingTop: 90,
  11. '& .item': {
  12. height: theme.spacing(7),
  13. [theme.breakpoints.down(MOBILE_BREAKPOINT)]: {
  14. height: theme.spacing(8)
  15. },
  16. '& .has-left': {
  17. color: theme.palette.text03
  18. },
  19. '& .avatar': {
  20. marginRight: theme.spacing(3)
  21. },
  22. '& .time': {
  23. padding: '2px 4px',
  24. borderRadius: '4px',
  25. ...withPixelLineHeight(theme.typography.labelBold),
  26. [theme.breakpoints.down(MOBILE_BREAKPOINT)]: {
  27. ...withPixelLineHeight(theme.typography.bodyShortRegularLarge)
  28. },
  29. backgroundColor: theme.palette.ui02
  30. },
  31. '& .display-name': {
  32. ...withPixelLineHeight(theme.typography.bodyShortRegular),
  33. [theme.breakpoints.down(MOBILE_BREAKPOINT)]: {
  34. ...withPixelLineHeight(theme.typography.bodyShortRegularLarge)
  35. }
  36. },
  37. '& .dominant': {
  38. backgroundColor: theme.palette.success02
  39. }
  40. }
  41. }
  42. };
  43. });
  44. /**
  45. * Component that renders the list of speaker stats.
  46. *
  47. * @returns {React$Element<any>}
  48. */
  49. const SpeakerStatsList = () => {
  50. const { classes } = useStyles();
  51. const items = abstractSpeakerStatsList(SpeakerStatsItem);
  52. return (
  53. <div className = { classes.list }>
  54. <div className = 'separator' />
  55. {items}
  56. </div>
  57. );
  58. };
  59. export default SpeakerStatsList;