Skip to content

Commit 709ce01

Browse files
authored
Fix icon size of capability changed notification (#3541)
* Fix icon size of capability changed notification * Change files * Duplicate change files for beta release
1 parent d53fe38 commit 709ce01

3 files changed

Lines changed: 32 additions & 7 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "none",
3+
"area": "fix",
4+
"workstream": "Capabilities",
5+
"comment": "Fix icon size of capability changed notification",
6+
"packageName": "@azure/communication-react",
7+
"email": "79475487+mgamis-msft@users.noreply.github.com",
8+
"dependentChangeType": "none"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "none",
3+
"area": "fix",
4+
"workstream": "Capabilities",
5+
"comment": "Fix icon size of capability changed notification",
6+
"packageName": "@azure/communication-react",
7+
"email": "79475487+mgamis-msft@users.noreply.github.com",
8+
"dependentChangeType": "none"
9+
}

packages/react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.tsx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const CapabilitiesChangedNotificationBar = (props: CapabilitiesChangeNoti
6969
if (!message) {
7070
return null;
7171
}
72-
const iconProps = getNotificationIconProps(notification);
72+
const iconProps = getCustomMessageBarIconProps(notification);
7373
return (
7474
<MessageBar
7575
key={notification.capabilityName}
@@ -120,20 +120,27 @@ const getCapabilityChangedNotificationString = (
120120
};
121121

122122
/* @conditional-compile-remove(capabilities) */
123-
const getNotificationIconProps = (notification: CapabalityChangedNotification): IIconProps | undefined => {
123+
const getCustomMessageBarIconProps = (notification: CapabalityChangedNotification): IIconProps | undefined => {
124+
let iconName: string | undefined = undefined;
124125
switch (notification.capabilityName) {
125126
case 'turnVideoOn':
126127
if (notification.isPresent) {
127-
return { iconName: 'ControlButtonCameraOn' };
128+
iconName = 'ControlButtonCameraOn';
129+
} else {
130+
iconName = 'ControlButtonCameraProhibited';
128131
}
129-
return { iconName: 'ControlButtonCameraProhibited' };
132+
break;
130133
case 'unmuteMic':
131134
if (notification.isPresent) {
132-
return { iconName: 'ControlButtonMicOn' };
135+
iconName = 'ControlButtonMicOn';
136+
} else {
137+
iconName = 'ControlButtonMicProhibited';
133138
}
134-
return { iconName: 'ControlButtonMicProhibited' };
139+
break;
140+
default:
141+
return undefined;
135142
}
136-
return undefined;
143+
return { iconName, styles: { root: { '> *': { height: '1rem', width: '1rem' } } } };
137144
};
138145

139146
/* @conditional-compile-remove(capabilities) */

0 commit comments

Comments
 (0)