Skip to content

Commit

Permalink
add meeting icon (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
seekdavidlee authored Feb 2, 2024
1 parent 2a0f911 commit 47708ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ export const ChatListItem = ({ chat, myId, isSelected, isRead }: IMgtChatListIte
// define the JSX for FluentUI Icons + Styling
const oneOnOneProfilePicture = <ChatListItemIcon chatType="oneOnOne" />;
const GroupProfilePicture = <ChatListItemIcon chatType="group" />;
const meetingProfilePicture = <ChatListItemIcon chatType="meeting" />;

const other = c.members?.find(m => (m as AadUserConversationMember).userId !== myId);
const otherAad = other as AadUserConversationMember;
Expand All @@ -366,6 +367,8 @@ export const ChatListItem = ({ chat, myId, isSelected, isRead }: IMgtChatListIte
);
case c.chatType === 'group':
return GroupProfilePicture;
case c.chatType === 'meeting':
return meetingProfilePicture;
default:
return oneOnOneProfilePicture;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
import React from 'react';
import { Chat } from '@microsoft/microsoft-graph-types';
import { PeopleTeam24Regular, Person24Regular, bundleIcon } from '@fluentui/react-icons';
import { CalendarLtr24Regular, PeopleTeam24Regular, Person24Regular, bundleIcon } from '@fluentui/react-icons';
import { error } from '@microsoft/mgt-element';
import { Circle } from '../Circle/Circle';

const GroupIcon = bundleIcon(PeopleTeam24Regular, PeopleTeam24Regular);
const PersonIcon = bundleIcon(Person24Regular, Person24Regular);
const MeetingIcon = bundleIcon(CalendarLtr24Regular, CalendarLtr24Regular);
export const ChatListItemIcon = ({ chatType }: Chat): JSX.Element | null => {
if (!chatType) return null;

const iconColor = 'var(--colorBrandForeground2)';

switch (chatType) {
case 'meeting':
return (
<Circle>
<MeetingIcon color={iconColor} />
</Circle>
);
case 'oneOnOne':
return (
<Circle>
Expand Down

0 comments on commit 47708ad

Please sign in to comment.