Skip to content

Commit e05b7e3

Browse files
authored
fix(teams): make EmptyChannelListIndicator less prominent (#98)
1 parent 2c35d72 commit e05b7e3

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
3+
export const EmptyGroupChannelListIndicator = ({
4+
5+
}) => {
6+
7+
return (
8+
<div className="team-empty-channel-list-indicator">There are no group channels. Start by creating some.</div>
9+
);
10+
};
11+
export const EmptyDMChannelListIndicator = ({
12+
13+
}) => {
14+
15+
return (
16+
<div className="team-empty-channel-list-indicator">There are no DM channels. Start by creating some.</div>
17+
);
18+
};

team-ts/src/components/Sidebar/Sidebar.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { ChannelList } from 'stream-chat-react';
22

3+
import {
4+
EmptyDMChannelListIndicator,
5+
EmptyGroupChannelListIndicator
6+
} from "./EmptyChannelListIndicator";
37
import { ChannelSearch } from '../ChannelSearch/ChannelSearch';
48
import { TeamChannelList } from '../TeamChannelList/TeamChannelList';
59
import { ChannelPreview } from '../ChannelPreview/ChannelPreview';
@@ -40,6 +44,7 @@ const TeamChannelsList = () => (
4044
filters={filters[0]}
4145
options={options}
4246
sort={sort}
47+
EmptyStateIndicator={EmptyGroupChannelListIndicator}
4348
List={(listProps) => (
4449
<TeamChannelList
4550
{...listProps}
@@ -62,6 +67,7 @@ const MessagingChannelsList = () => (
6267
options={options}
6368
sort={sort}
6469
setActiveChannelOnMount={false}
70+
EmptyStateIndicator={EmptyDMChannelListIndicator}
6571
List={(listProps) => (
6672
<TeamChannelList
6773
{...listProps}

team-ts/src/styles/ChannelList/ChannelList.layout.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,8 @@
3939
}
4040
}
4141
}
42+
43+
.team-empty-channel-list-indicator {
44+
padding-inline: 1rem;
45+
font-size: 0.75rem;
46+
}

team-ts/src/styles/ChannelList/ChannelList.theme.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@
2525
}
2626
}
2727
}
28+
29+
.team-empty-channel-list-indicator {
30+
color: white;
31+
}

0 commit comments

Comments
 (0)