-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
61 lines (54 loc) · 1.68 KB
/
index.d.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
53
54
55
56
57
58
59
60
61
declare module '*.svg' {
const ReactComponent: React.FC<React.SVGProps<SVGSVGElement>>;
export default ReactComponent;
}
declare module 'react-facebook-login/dist/facebook-login-render-props' {
export interface RenderProps {
onClick: ((event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void) | undefined;
isDisabled: boolean;
isProcessing: boolean;
isSdkLoaded: boolean;
}
interface ReactFacebookLoginProps {
appId: string;
callback(userInfo: ReactFacebookLoginInfo): void;
onFailure?(response: ReactFacebookFailureResponse): void;
autoLoad?: boolean;
buttonStyle?: React.CSSProperties;
containerStyle?: React.CSSProperties;
cookie?: boolean;
cssClass?: string;
disableMobileRedirect?: boolean;
fields?: string;
icon?: string | React.ReactNode;
isDisabled?: boolean;
language?: string;
onClick?(event: React.MouseEvent<HTMLDivElement>): void;
reAuthenticate?: boolean;
redirectUri?: string;
scope?: string;
size?: 'small' | 'medium' | 'metro';
textButton?: string;
typeButton?: string;
version?: string;
xfbml?: boolean;
isMobile?: boolean;
tag?: Node | React.Component<any>;
render(props: RenderProps): void;
}
interface ReactFacebookFailureResponse {
status?: string;
}
interface ReactFacebookLoginInfo {
id: string;
accessToken: string;
name?: string;
email?: string;
}
interface ReactFacebookLoginState {
isSdkLoaded?: boolean;
isProcessing?: boolean;
}
// eslint-disable-next-line react/prefer-stateless-function
export default class ReactFacebookLogin extends React.Component<ReactFacebookLoginProps, ReactFacebookLoginState> {}
}