Minor: rename a <CallingHeader> prop for clarity

This commit is contained in:
Evan Hahn 2020-11-25 12:16:51 -06:00 committed by Scott Nonnenberg
parent a5657473c3
commit b2087cb8a2
4 changed files with 12 additions and 14 deletions

View file

@ -232,7 +232,7 @@ export const CallScreen: React.FC<PropsType> = ({
i18n={i18n}
isGroupCall={call.callMode === CallMode.Group}
message={headerMessage}
remoteParticipants={participantCount}
participantCount={participantCount}
showParticipantsList={showParticipantsList}
title={headerTitle}
toggleParticipants={toggleParticipants}

View file

@ -17,9 +17,9 @@ const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
i18n,
isGroupCall: boolean('isGroupCall', Boolean(overrideProps.isGroupCall)),
message: overrideProps.message,
remoteParticipants: number(
'remoteParticipants',
overrideProps.remoteParticipants || 0
participantCount: number(
'participantCount',
overrideProps.participantCount || 0
),
showParticipantsList: boolean(
'showParticipantsList',
@ -44,7 +44,7 @@ story.add('With Participants', () => (
{...createProps({
canPip: true,
isGroupCall: true,
remoteParticipants: 10,
participantCount: 10,
})}
/>
));
@ -54,7 +54,7 @@ story.add('With Participants (shown)', () => (
{...createProps({
canPip: true,
isGroupCall: true,
remoteParticipants: 10,
participantCount: 10,
showParticipantsList: true,
})}
/>

View file

@ -11,7 +11,7 @@ export type PropsType = {
i18n: LocalizerType;
isGroupCall?: boolean;
message?: string;
remoteParticipants?: number;
participantCount: number;
showParticipantsList: boolean;
title?: string;
toggleParticipants?: () => void;
@ -24,7 +24,7 @@ export const CallingHeader = ({
i18n,
isGroupCall = false,
message,
remoteParticipants,
participantCount,
showParticipantsList,
title,
toggleParticipants,
@ -42,14 +42,12 @@ export const CallingHeader = ({
{isGroupCall ? (
<div className="module-calling-tools__button">
<Tooltip
content={i18n('calling__participants', [
String(remoteParticipants),
])}
content={i18n('calling__participants', [String(participantCount)])}
theme={TooltipTheme.Dark}
>
<button
aria-label={i18n('calling__participants', [
String(remoteParticipants),
String(participantCount),
])}
className={classNames(
'module-calling-button__participants--container',
@ -62,7 +60,7 @@ export const CallingHeader = ({
>
<i className="module-calling-button__participants" />
<span className="module-calling-button__participants--count">
{remoteParticipants}
{participantCount}
</span>
</button>
</Tooltip>

View file

@ -159,7 +159,7 @@ export const CallingLobby = ({
title={conversation.title}
i18n={i18n}
isGroupCall={isGroupCall}
remoteParticipants={participantNames.length}
participantCount={participantNames.length}
showParticipantsList={showParticipantsList}
toggleParticipants={toggleParticipants}
toggleSettings={toggleSettings}