Files
upstream-jitsi-meet/react/features/participants-pane/components/web/ParticipantsCounter.tsx
upstream-mirror 1d2bfcac0c
Some checks failed
Prosody Plugin Tests / test (push) Failing after 10m11s
Close stale issues and PRs / stale (push) Failing after 1s
snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
2026-09-15 15:56:32 +05:00

34 lines
1000 B
TypeScript

import React from 'react';
import { useSelector } from 'react-redux';
import { makeStyles } from 'tss-react/mui';
import { getParticipantCountForDisplay } from '../../../base/participants/functions';
const useStyles = makeStyles()(theme => {
return {
badge: {
backgroundColor: theme.palette.participantCounterBadge,
borderRadius: '100%',
height: '16px',
minWidth: '16px',
color: theme.palette.participantCounterText,
...theme.typography.labelBold,
pointerEvents: 'none',
position: 'absolute',
right: '-4px',
top: '-3px',
textAlign: 'center',
padding: '1px'
}
};
});
const ParticipantsCounter = () => {
const { classes } = useStyles();
const participantsCount = useSelector(getParticipantCountForDisplay);
return <span className = { classes.badge }>{participantsCount}</span>;
};
export default ParticipantsCounter;