You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ParticipantsCounter.tsx 976B

1234567891011121314151617181920212223242526272829303132
  1. import React from 'react';
  2. import { useSelector } from 'react-redux';
  3. import { makeStyles } from 'tss-react/mui';
  4. import { getParticipantCount } from '../../../base/participants/functions';
  5. import { withPixelLineHeight } from '../../../base/styles/functions.web';
  6. const useStyles = makeStyles()(theme => {
  7. return {
  8. badge: {
  9. backgroundColor: theme.palette.ui03,
  10. borderRadius: '100%',
  11. height: '16px',
  12. width: '16px',
  13. color: theme.palette.text01,
  14. ...withPixelLineHeight(theme.typography.labelBold),
  15. pointerEvents: 'none',
  16. position: 'absolute',
  17. right: '-4px',
  18. top: '-3px'
  19. }
  20. };
  21. });
  22. const ParticipantsCounter = () => {
  23. const { classes } = useStyles();
  24. const participantsCount = useSelector(getParticipantCount);
  25. return <span className = { classes.badge }>{participantsCount}</span>;
  26. };
  27. export default ParticipantsCounter;