Skip to content

Commit

Permalink
fix(teams): make EmptyChannelListIndicator less prominent (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinCupela authored Jun 18, 2024
1 parent 2c35d72 commit e05b7e3
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
18 changes: 18 additions & 0 deletions team-ts/src/components/Sidebar/EmptyChannelListIndicator.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@


export const EmptyGroupChannelListIndicator = ({

}) => {

return (
<div className="team-empty-channel-list-indicator">There are no group channels. Start by creating some.</div>
);
};
export const EmptyDMChannelListIndicator = ({

}) => {

return (
<div className="team-empty-channel-list-indicator">There are no DM channels. Start by creating some.</div>
);
};
6 changes: 6 additions & 0 deletions team-ts/src/components/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { ChannelList } from 'stream-chat-react';

import {
EmptyDMChannelListIndicator,
EmptyGroupChannelListIndicator
} from "./EmptyChannelListIndicator";
import { ChannelSearch } from '../ChannelSearch/ChannelSearch';
import { TeamChannelList } from '../TeamChannelList/TeamChannelList';
import { ChannelPreview } from '../ChannelPreview/ChannelPreview';
Expand Down Expand Up @@ -40,6 +44,7 @@ const TeamChannelsList = () => (
filters={filters[0]}
options={options}
sort={sort}
EmptyStateIndicator={EmptyGroupChannelListIndicator}
List={(listProps) => (
<TeamChannelList
{...listProps}
Expand All @@ -62,6 +67,7 @@ const MessagingChannelsList = () => (
options={options}
sort={sort}
setActiveChannelOnMount={false}
EmptyStateIndicator={EmptyDMChannelListIndicator}
List={(listProps) => (
<TeamChannelList
{...listProps}
Expand Down
5 changes: 5 additions & 0 deletions team-ts/src/styles/ChannelList/ChannelList.layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@
}
}
}

.team-empty-channel-list-indicator {
padding-inline: 1rem;
font-size: 0.75rem;
}
4 changes: 4 additions & 0 deletions team-ts/src/styles/ChannelList/ChannelList.theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@
}
}
}

.team-empty-channel-list-indicator {
color: white;
}

0 comments on commit e05b7e3

Please sign in to comment.