/
types.ts
52 lines (47 loc) · 1.71 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import type React from 'react';
import type { UseUserListOptions } from '@sendbird/uikit-chat-hooks';
import type { SendbirdOpenChannel, SendbirdRestrictedUser } from '@sendbird/uikit-utils';
import type { CommonComponent } from '../../types';
export type OpenChannelBannedUsersProps = {
Fragment: {
channel: SendbirdOpenChannel;
onPressHeaderLeft: OpenChannelBannedUsersProps['Header']['onPressHeaderLeft'];
renderUser?: OpenChannelBannedUsersProps['List']['renderUser'];
queryCreator?: UseUserListOptions<SendbirdRestrictedUser>['queryCreator'];
};
Header: {
onPressHeaderLeft: () => void;
};
List: {
renderUser: (props: { user: SendbirdRestrictedUser }) => React.ReactElement | null;
bannedUsers: SendbirdRestrictedUser[];
ListEmptyComponent?: React.ReactElement;
onLoadNext: () => Promise<void>;
};
StatusError: {
onPressRetry: () => void;
};
Provider: {
channel: SendbirdOpenChannel;
};
};
/**
* Internal context for OpenChannelBannedUsers
* For example, the developer can create a custom header
* with getting data from the domain context
* */
export type OpenChannelBannedUsersContextsType = {
Fragment: React.Context<{
headerTitle: string;
channel: SendbirdOpenChannel;
}>;
};
export interface OpenChannelBannedUsersModule {
Provider: CommonComponent<OpenChannelBannedUsersProps['Provider']>;
Header: CommonComponent<OpenChannelBannedUsersProps['Header']>;
List: CommonComponent<OpenChannelBannedUsersProps['List']>;
StatusEmpty: CommonComponent;
StatusLoading: CommonComponent;
StatusError: CommonComponent<OpenChannelBannedUsersProps['StatusError']>;
}
export type OpenChannelBannedUsersFragment = React.FC<OpenChannelBannedUsersProps['Fragment']>;