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 CHANGED
@@ -1 +1 @@
1
- # survey access from url in our app
1
+ # survey sdk for use in app
Binary file
package/index.js CHANGED
@@ -1,16 +1,26 @@
1
1
  // src/SurveyWebView.js
2
2
  import React from 'react';
3
- import { WebView } from 'react-native-webview';
4
- import { SafeAreaView } from 'react-native';
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 SURVEY_URL = url || 'https://example.com/survey'; // Static URL fallback
8
-
8
+ const navigation = useNavigation()
9
+ const SURVEY_URL = url
9
10
  return (
10
- <SafeAreaView style={{ flex: 1 ,backgroundColor:'cyan'}}>
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
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-my-survey-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "For xebo.ai",
5
5
  "main": "index.js",
6
6
  "scripts": {