123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- // @flow
-
- import { makeStyles } from '@material-ui/core/styles';
- import React from 'react';
-
- import { MOBILE_BREAKPOINT } from '../../constants';
- import abstractSpeakerStatsList from '../AbstractSpeakerStatsList';
-
- import SpeakerStatsItem from './SpeakerStatsItem';
-
- const useStyles = makeStyles(theme => {
- return {
- list: {
- marginTop: `${theme.spacing(3)}px`,
- marginBottom: `${theme.spacing(3)}px`
- },
- 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
- }
- };
- });
-
- /**
- * Component that renders the list of speaker stats.
- *
- * @returns {React$Element<any>}
- */
- const SpeakerStatsList = () => {
- const classes = useStyles();
- const items = abstractSpeakerStatsList(SpeakerStatsItem, classes);
-
- return (
- <div className = { classes.list }>
- {items}
- </div>
- );
- };
-
- export default SpeakerStatsList;
|