Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

Commit f496f11

Browse files
committed
Update Weloop
1 parent 1b88c1b commit f496f11

File tree

3 files changed

+31
-30
lines changed

3 files changed

+31
-30
lines changed

README.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,43 +11,44 @@ npm install react-native-weloop --save
1111
### Import
1212

1313
```js
14-
import Weeloop from "react-native-weloop";
15-
````
14+
import Weloop from "react-native-weloop";
15+
```
16+
1617
### Simple Example
1718

1819
```js
19-
<Weeloop
20-
appGuid="YOUR_PROJECT_GUID"
21-
/>
20+
<Weloop appGuid="YOUR_PROJECT_GUID" />
2221
```
2322

24-
2523
### Automatic Authentication
24+
2625
In order to invoke WeLoop with an automatic authentication, you need to provide the user identity.
2726

2827
```js
29-
<Weeloop
30-
appGuid="YOUR_PROJECT_GUID"
31-
user={{
32-
email: "YOUR_EMAIL",
33-
firstname: "YOUR_FIRSTNAME",
34-
lastname: "YOUR_LASTNAME",
35-
key: "YOUR_KEY",
36-
}}
28+
<Weloop
29+
appGuid="YOUR_PROJECT_GUID"
30+
user={{
31+
email: "YOUR_EMAIL",
32+
firstname: "YOUR_FIRSTNAME",
33+
lastname: "YOUR_LASTNAME",
34+
key: "YOUR_KEY",
35+
}}
3736
/>
3837
```
38+
3939
### Custom Invocation
4040

41-
To invoke the Weeloop WebView with a custom Button, you need to add props:
41+
To invoke the Weloop WebView with a custom Button, you need to add props:
42+
4243
```js
4344
<Button
4445
title="WebView"
4546
onPress={() => {
46-
this.weeloop.current.invoke();
47+
this.weloop.current.invoke();
4748
}}
4849
/>
49-
<Weeloop
50-
ref={this.weeloop}
50+
<Weloop
51+
ref={this.weloop}
5152
custom={false}
5253
appGuid="YOUR_PROJECT_GUID"
5354
/>
@@ -57,11 +58,11 @@ To invoke the Weeloop WebView with a custom Button, you need to add props:
5758

5859
### Weloop props
5960

60-
| Props | type | description | required | default |
61-
| :-------------- | :------------- | :------------------------------------------------------------------- | :------- | :------ |
62-
| appGuid | String | Api Key for weloop webview | required | null
63-
| custom | bool | enable/disable custom invocation | | false
64-
| user | Object | User informations object with email, firstname, lastname and key | | null
61+
| Props | type | description | required | default |
62+
| :------ | :----- | :--------------------------------------------------------------- | :------- | :------ |
63+
| appGuid | String | Api Key for weloop webview | required | null |
64+
| custom | bool | enable/disable custom invocation | | false |
65+
| user | Object | User informations object with email, firstname, lastname and key | | null |
6566

6667
## License
6768

examples/full/App.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React, { Component } from "react";
22
import { StyleSheet, Text, View, Button } from "react-native";
3-
import Weeloop from "react-native-weloop";
3+
import Weloop from "react-native-weloop";
44

55
export default class App extends Component {
66
constructor(props) {
77
super();
8-
this.weeloop = React.createRef();
8+
this.weloop = React.createRef();
99
}
1010

1111
render() {
@@ -16,12 +16,12 @@ export default class App extends Component {
1616
<Button
1717
title="WebView"
1818
onPress={() => {
19-
this.weeloop.current.invoke();
19+
this.weloop.current.invoke();
2020
}}
2121
/>
2222
</View>
23-
<Weeloop
24-
ref={this.weeloop}
23+
<Weloop
24+
ref={this.weloop}
2525
custom={true}
2626
appGuid="e13f3070-69c5-11ea-9a63-811eefcd2144"
2727
user={{

examples/simple/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { Component } from "react";
22
import { StyleSheet, Text, View } from "react-native";
3-
import Weeloop from "react-native-weloop";
3+
import Weloop from "react-native-weloop";
44

55
export default class App extends Component {
66
render() {
@@ -9,7 +9,7 @@ export default class App extends Component {
99
<View style={styles.container}>
1010
<Text>Une application parfaite pour weloop !</Text>
1111
</View>
12-
<Weeloop appGuid="e13f3070-69c5-11ea-9a63-811eefcd2144" />
12+
<Weloop appGuid="e13f3070-69c5-11ea-9a63-811eefcd2144" />
1313
</View>
1414
);
1515
}

0 commit comments

Comments
 (0)