jiti-meet/react/features/speaker-stats/components/web/SpeakerStatsList.tsx

71 lines
1.9 KiB
TypeScript
Raw Normal View History

/* eslint-disable lines-around-comment */
import React from 'react';
2022-09-13 07:36:00 +00:00
import { makeStyles } from 'tss-react/mui';
2022-09-13 07:36:00 +00:00
import { withPixelLineHeight } from '../../../base/styles/functions.web';
import { MOBILE_BREAKPOINT } from '../../constants';
// @ts-ignore
import abstractSpeakerStatsList from '../AbstractSpeakerStatsList';
// @ts-ignore
import SpeakerStatsItem from './SpeakerStatsItem';
const useStyles = makeStyles()(theme => {
return {
list: {
2022-09-13 07:36:00 +00:00
marginTop: theme.spacing(3),
marginBottom: theme.spacing(3)
},
item: {
2022-09-13 07:36:00 +00:00
height: theme.spacing(7),
[theme.breakpoints.down(MOBILE_BREAKPOINT)]: {
2022-09-13 07:36:00 +00:00
height: theme.spacing(8)
}
},
avatar: {
2022-09-13 07:36:00 +00:00
height: theme.spacing(5)
},
expressions: {
paddingLeft: 29
},
hasLeft: {
color: theme.palette.text03
},
displayName: {
2022-09-13 07:36:00 +00:00
...withPixelLineHeight(theme.typography.bodyShortRegular),
[theme.breakpoints.down(MOBILE_BREAKPOINT)]: {
2022-09-13 07:36:00 +00:00
...withPixelLineHeight(theme.typography.bodyShortRegularLarge)
}
},
time: {
padding: '2px 4px',
borderRadius: '4px',
2022-09-13 07:36:00 +00:00
...withPixelLineHeight(theme.typography.labelBold),
[theme.breakpoints.down(MOBILE_BREAKPOINT)]: {
2022-09-13 07:36:00 +00:00
...withPixelLineHeight(theme.typography.bodyShortRegularLarge)
}
},
dominant: {
backgroundColor: theme.palette.success02
}
};
});
/**
* 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();
const items = abstractSpeakerStatsList(SpeakerStatsItem, classes);
return (
<div className = { classes.list }>
{items}
</div>
);
};
export default SpeakerStatsList;