react-native-my-survey-sdk 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ReadMe.md +1 -1
- package/assets/close.png +0 -0
- package/index.js +15 -5
- package/package.json +1 -1
package/ReadMe.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
# survey
|
|
1
|
+
# survey sdk for use in app
|
package/assets/close.png
ADDED
|
Binary file
|
package/index.js
CHANGED
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
// src/SurveyWebView.js
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { TouchableOpacity,SafeAreaView,Image} from 'react-native';
|
|
4
|
+
import {WebView} from 'react-native-webview';
|
|
5
|
+
import { useNavigation } from '@react-navigation/native';
|
|
5
6
|
|
|
6
7
|
const SurveyWebView = ({ url }) => {
|
|
7
|
-
const
|
|
8
|
-
|
|
8
|
+
const navigation = useNavigation()
|
|
9
|
+
const SURVEY_URL = url
|
|
9
10
|
return (
|
|
10
|
-
|
|
11
|
+
<SafeAreaView style={{flex: 1}}>
|
|
12
|
+
<TouchableOpacity style={{alignItems: 'flex-end', right: 15}}
|
|
13
|
+
onPress={() => navigation.goBack()}
|
|
14
|
+
>
|
|
15
|
+
<Image
|
|
16
|
+
source={require('./assets/close.png')}
|
|
17
|
+
style={{height: 15, width: 20}}
|
|
18
|
+
/>
|
|
19
|
+
</TouchableOpacity>
|
|
11
20
|
<WebView source={{ uri: SURVEY_URL }} />
|
|
12
21
|
</SafeAreaView>
|
|
13
22
|
);
|
|
14
23
|
};
|
|
15
24
|
|
|
16
25
|
export default SurveyWebView;
|
|
26
|
+
|