-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
42 lines (37 loc) · 1018 Bytes
/
index.d.ts
File metadata and controls
42 lines (37 loc) · 1018 Bytes
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
// index.d.ts
import { ReactElement } from 'react';
import { ViewStyle } from 'react-native';
declare module '@chative.io/react-native-widget' {
export interface ChativeWidgetUser {
user_id: string;
user: {
email?: string;
first_name?: string;
last_name?: string;
phone?: string;
[key: string]: any;
};
}
export interface ChativeWidgetProps {
channelId: string;
user?: ChativeWidgetUser;
headerComponent?: ReactElement;
containerStyle?: ViewStyle;
insetTop?: number;
insetBottom?: number;
onClosed?: () => void;
onLoaded?: () => void;
onError?: (error: any) => void;
onNewMessage?: (message: any) => void;
}
export interface ChativeWidgetRef {
show: () => void;
hide: () => void;
injectJavaScript: (script: string) => void;
reload: () => void;
}
const ChativeWidget: React.ForwardRefExoticComponent<
ChativeWidgetProps & React.RefAttributes<ChativeWidgetRef>
>;
export default ChativeWidget;
}