Skip to content

Commit

Permalink
adjust messages empty state padding
Browse files Browse the repository at this point in the history
  • Loading branch information
armaniferrante committed Dec 22, 2022
1 parent 6c1ce10 commit 2b3b13d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
42 changes: 24 additions & 18 deletions packages/message-sdk/src/components/Inbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,24 +108,30 @@ export function Inbox() {
<UserList users={searchedUsersDistinct} />
</div>
)}
{!messagesLoading && searchFilter.length < 3 && activeChats.length === 0 && (
<div
style={{
flexGrow: 1,
justifyContent: "center",
flexDirection: "column",
display: "flex",
paddingBottom: 50,
}}
>
{" "}
<EmptyState
icon={(props: any) => <ChatBubbleIcon {...props} />}
title={"No messages"}
subtitle={"Search for someone to send a message to!"}
/>
</div>
)}
{!messagesLoading &&
searchFilter.length < 3 &&
activeChats.length === 0 && (
<div
style={{
flexGrow: 1,
justifyContent: "center",
flexDirection: "column",
display: "flex",
paddingBottom: 50,
}}
>
{" "}
<EmptyState
icon={(props: any) => <ChatBubbleIcon {...props} />}
title={"No messages"}
subtitle={"Search for someone to send a message!"}
style={{
paddingLeft: 0,
paddingRight: 0,
}}
/>
</div>
)}
</div>
);
}
5 changes: 4 additions & 1 deletion packages/react-common/src/components/base/EmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@ export const EmptyState: React.FC<{
subtitle: string;
buttonText?: string;
onClick?: () => void;
contentStyle?: React.CSSProperties;
minimize?: boolean;
verticallyCentered?: boolean;
contentStyle?: React.CSSProperties;
style?: React.CSSProperties;
}> = ({
icon,
title,
subtitle,
buttonText,
onClick,
contentStyle,
style,
minimize,
verticallyCentered = true,
}) => {
Expand All @@ -34,6 +36,7 @@ export const EmptyState: React.FC<{
display: "flex",
flexDirection: "column",
justifyContent: "center",
...style,
}}
>
<div
Expand Down

0 comments on commit 2b3b13d

Please sign in to comment.