Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

SpeakerStatsList.tsx 2.0KB

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