-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcomponent.tsx
48 lines (39 loc) · 1.02 KB
/
component.tsx
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
import React from 'react';
import {
TellerConnect,
TellerConnectOnSuccess,
TellerConnectOnEvent,
TellerConnectOnExit,
} from 'teller-connect-react';
interface Props {}
class TellerConnectClass extends React.Component<Props> {
applicationId: string;
constructor(props: Props) {
super(props);
this.applicationId = 'your_app_id';
}
onSuccess: TellerConnectOnSuccess = (authorization) => {
console.log(authorization);
};
onEvent: TellerConnectOnEvent = (name, data) => {
console.log(name, data);
};
onExit: TellerConnectOnExit = () => {
console.log("TellerConect was dismissed by the user");
};
render() {
return (
<TellerConnect
className="CustomButton"
style={{ padding: '20px', fontSize: '16px', cursor: 'pointer' }}
applicationId={this.applicationId}
onSuccess={this.onSuccess}
onEvent={this.onEvent}
onExit={this.onExit}
>
Link your bank account
</TellerConnect>
);
}
}
export default TellerConnectClass;