diff --git a/packages/react-chat/src/components/Chat/ChatMessages.tsx b/packages/react-chat/src/components/Chat/ChatMessages.tsx index 716890f3..24ded732 100644 --- a/packages/react-chat/src/components/Chat/ChatMessages.tsx +++ b/packages/react-chat/src/components/Chat/ChatMessages.tsx @@ -73,7 +73,6 @@ const MessagesWrapper = styled.div` const MessageWrapper = styled.div` width: 100%; display: flex; - align-items: center; padding: 8px 0; margin-bottom: 8px; `; @@ -121,6 +120,7 @@ export const Icon = styled.div` align-items: end; border-radius: 50%; background-color: #bcbdff; + flex-shrink: 0; `; const UserNameWrapper = styled.div` diff --git a/packages/react-chat/src/components/Icons/UserIcon.tsx b/packages/react-chat/src/components/Icons/UserIcon.tsx index e0160149..d9453700 100644 --- a/packages/react-chat/src/components/Icons/UserIcon.tsx +++ b/packages/react-chat/src/components/Icons/UserIcon.tsx @@ -3,19 +3,19 @@ import styled from "styled-components"; import { Theme } from "../../styles/themes"; -interface ThemeProps { +interface UserIconProps { theme: Theme; + memberView?: boolean; } -export const UserIcon = ({ theme }: ThemeProps) => { +export const UserIcon = ({ theme, memberView }: UserIconProps) => { return ( { ); }; -const Icon = styled.svg` +const Icon = styled.svg` + width: ${({ memberView }) => (memberView ? "20px" : "34px")}; + height: ${({ memberView }) => (memberView ? "20px" : "34px")}; + & > path, & > ellipse { fill: ${({ theme }) => theme.iconUserColor}; diff --git a/packages/react-chat/src/components/Members.tsx b/packages/react-chat/src/components/Members.tsx index d1dde3da..7742ef5b 100644 --- a/packages/react-chat/src/components/Members.tsx +++ b/packages/react-chat/src/components/Members.tsx @@ -21,9 +21,9 @@ export function Members({ theme, channel, setShowChannels }: MembersProps) { You - - - + + + Guest564732 @@ -82,7 +82,7 @@ export function Member({ className={isOnline ? "online" : ""} theme={theme} > - {!member.avatar && } + {!member.avatar && } {member.name} @@ -148,6 +148,8 @@ const MemberData = styled.div` `; const MemberIcon = styled(Icon)` + width: 24px; + height: 24px; position: relative; background-size: contain; background-position: center; @@ -159,8 +161,8 @@ const MemberIcon = styled(Icon)` position: absolute; right: -1px; bottom: 1px; - width: 9px; - height: 9px; + width: 7px; + height: 7px; border-radius: 50%; background-color: #4ebc60; border: 2px solid ${({ theme }) => theme.bodyBackgroundColor};