2022-08-25 11:35:19 +00:00
|
|
|
/* eslint-disable lines-around-comment */
|
2021-11-10 17:49:53 +00:00
|
|
|
import React from 'react';
|
2022-09-13 07:36:00 +00:00
|
|
|
import { makeStyles } from 'tss-react/mui';
|
2021-11-10 17:49:53 +00:00
|
|
|
|
2022-09-13 07:36:00 +00:00
|
|
|
import { withPixelLineHeight } from '../../../base/styles/functions.web';
|
2021-12-28 14:35:21 +00:00
|
|
|
import { MOBILE_BREAKPOINT } from '../../constants';
|
2022-08-25 11:35:19 +00:00
|
|
|
// @ts-ignore
|
2021-11-10 17:49:53 +00:00
|
|
|
import abstractSpeakerStatsList from '../AbstractSpeakerStatsList';
|
|
|
|
|
2022-08-25 11:35:19 +00:00
|
|
|
// @ts-ignore
|
2021-11-10 17:49:53 +00:00
|
|
|
import SpeakerStatsItem from './SpeakerStatsItem';
|
|
|
|
|
2022-11-15 07:50:22 +00:00
|
|
|
const useStyles = makeStyles()(theme => {
|
2021-12-28 14:35:21 +00:00
|
|
|
return {
|
|
|
|
list: {
|
2022-09-13 07:36:00 +00:00
|
|
|
marginTop: theme.spacing(3),
|
|
|
|
marginBottom: theme.spacing(3)
|
2021-12-28 14:35:21 +00:00
|
|
|
},
|
|
|
|
item: {
|
2022-09-13 07:36:00 +00:00
|
|
|
height: theme.spacing(7),
|
2021-12-28 14:35:21 +00:00
|
|
|
[theme.breakpoints.down(MOBILE_BREAKPOINT)]: {
|
2022-09-13 07:36:00 +00:00
|
|
|
height: theme.spacing(8)
|
2021-12-28 14:35:21 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
avatar: {
|
2022-09-13 07:36:00 +00:00
|
|
|
height: theme.spacing(5)
|
2021-12-28 14:35:21 +00:00
|
|
|
},
|
|
|
|
expressions: {
|
|
|
|
paddingLeft: 29
|
|
|
|
},
|
|
|
|
hasLeft: {
|
|
|
|
color: theme.palette.text03
|
|
|
|
},
|
|
|
|
displayName: {
|
2022-09-13 07:36:00 +00:00
|
|
|
...withPixelLineHeight(theme.typography.bodyShortRegular),
|
2021-12-28 14:35:21 +00:00
|
|
|
[theme.breakpoints.down(MOBILE_BREAKPOINT)]: {
|
2022-09-13 07:36:00 +00:00
|
|
|
...withPixelLineHeight(theme.typography.bodyShortRegularLarge)
|
2021-12-28 14:35:21 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
time: {
|
|
|
|
padding: '2px 4px',
|
|
|
|
borderRadius: '4px',
|
2022-09-13 07:36:00 +00:00
|
|
|
...withPixelLineHeight(theme.typography.labelBold),
|
2021-12-28 14:35:21 +00:00
|
|
|
[theme.breakpoints.down(MOBILE_BREAKPOINT)]: {
|
2022-09-13 07:36:00 +00:00
|
|
|
...withPixelLineHeight(theme.typography.bodyShortRegularLarge)
|
2021-12-28 14:35:21 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
dominant: {
|
|
|
|
backgroundColor: theme.palette.success02
|
|
|
|
}
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2021-11-10 17:49:53 +00:00
|
|
|
/**
|
|
|
|
* Component that renders the list of speaker stats.
|
|
|
|
*
|
|
|
|
* @returns {React$Element<any>}
|
|
|
|
*/
|
|
|
|
const SpeakerStatsList = () => {
|
2022-09-13 07:36:00 +00:00
|
|
|
const { classes } = useStyles();
|
2021-12-28 14:35:21 +00:00
|
|
|
const items = abstractSpeakerStatsList(SpeakerStatsItem, classes);
|
2021-11-10 17:49:53 +00:00
|
|
|
|
|
|
|
return (
|
2021-12-28 14:35:21 +00:00
|
|
|
<div className = { classes.list }>
|
2021-11-10 17:49:53 +00:00
|
|
|
{items}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default SpeakerStatsList;
|