Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

ParticipantsCounter.tsx 1.0KB

12345678910111213141516171819202122232425262728293031323334
  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. minWidth: '16px',
  13. color: theme.palette.text01,
  14. ...withPixelLineHeight(theme.typography.labelBold),
  15. pointerEvents: 'none',
  16. position: 'absolute',
  17. right: '-4px',
  18. top: '-3px',
  19. textAlign: 'center',
  20. padding: '1px'
  21. }
  22. };
  23. });
  24. const ParticipantsCounter = () => {
  25. const { classes } = useStyles();
  26. const participantsCount = useSelector(getParticipantCount);
  27. return <span className = { classes.badge }>{participantsCount}</span>;
  28. };
  29. export default ParticipantsCounter;