2021-11-10 17:49:53 +00:00
|
|
|
// @flow
|
|
|
|
|
2021-12-28 14:35:21 +00:00
|
|
|
import { makeStyles } from '@material-ui/core/styles';
|
2021-11-10 17:49:53 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
2021-12-28 14:35:21 +00:00
|
|
|
import { MOBILE_BREAKPOINT } from '../../constants';
|
2021-11-10 17:49:53 +00:00
|
|
|
import abstractSpeakerStatsList from '../AbstractSpeakerStatsList';
|
|
|
|
|
|
|
|
import SpeakerStatsItem from './SpeakerStatsItem';
|
|
|
|
|
2021-12-28 14:35:21 +00:00
|
|
|
const useStyles = makeStyles(theme => {
|
|
|
|
return {
|
|
|
|
list: {
|
2022-02-17 14:55:30 +00:00
|
|
|
marginTop: `${theme.spacing(3)}px`,
|
|
|
|
marginBottom: `${theme.spacing(3)}px`
|
2021-12-28 14:35:21 +00:00
|
|
|
},
|
|
|
|
item: {
|
|
|
|
height: `${theme.spacing(7)}px`,
|
|
|
|
[theme.breakpoints.down(MOBILE_BREAKPOINT)]: {
|
|
|
|
height: `${theme.spacing(8)}px`
|
|
|
|
}
|
|
|
|
},
|
|
|
|
avatar: {
|
|
|
|
height: `${theme.spacing(5)}px`
|
|
|
|
},
|
|
|
|
expressions: {
|
|
|
|
paddingLeft: 29
|
|
|
|
},
|
|
|
|
hasLeft: {
|
|
|
|
color: theme.palette.text03
|
|
|
|
},
|
|
|
|
displayName: {
|
|
|
|
...theme.typography.bodyShortRegular,
|
|
|
|
lineHeight: `${theme.typography.bodyShortRegular.lineHeight}px`,
|
|
|
|
[theme.breakpoints.down(MOBILE_BREAKPOINT)]: {
|
|
|
|
...theme.typography.bodyShortRegularLarge,
|
|
|
|
lineHeight: `${theme.typography.bodyShortRegular.lineHeightLarge}px`
|
|
|
|
}
|
|
|
|
},
|
|
|
|
time: {
|
|
|
|
padding: '2px 4px',
|
|
|
|
borderRadius: '4px',
|
|
|
|
...theme.typography.labelBold,
|
|
|
|
lineHeight: `${theme.typography.labelBold.lineHeight}px`,
|
|
|
|
[theme.breakpoints.down(MOBILE_BREAKPOINT)]: {
|
|
|
|
...theme.typography.bodyShortRegularLarge,
|
|
|
|
lineHeight: `${theme.typography.bodyShortRegular.lineHeightLarge}px`
|
|
|
|
}
|
|
|
|
},
|
|
|
|
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 = () => {
|
2021-12-28 14:35:21 +00:00
|
|
|
const classes = useStyles();
|
|
|
|
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;
|