react-native-my-survey-sdk 1.0.1 → 1.0.3

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.
Files changed (3) hide show
  1. package/ReadMe.md +1 -1
  2. package/index.js +14 -8
  3. package/package.json +9 -3
package/ReadMe.md CHANGED
@@ -1 +1 @@
1
- # survey access from url in our app
1
+ # survey sdk
package/index.js CHANGED
@@ -1,20 +1,26 @@
1
1
  // src/SurveyWebView.js
2
2
  import React from 'react';
3
- import { TouchableOpacity,Image } from 'react-native';
4
- import { WebView } from 'react-native-webview';
5
- import { SafeAreaView, TouchableOpacity } 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';
6
6
 
7
7
  const SurveyWebView = ({ url }) => {
8
+ const navigation = useNavigation()
8
9
  const SURVEY_URL = url
9
10
  return (
10
- <SafeAreaView style={{ flex: 1}}>
11
- <TouchableOpacity>
12
- <Image source={require('./assets/close.png')}
13
- />
14
- </TouchableOpacity>
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>
15
20
  <WebView source={{ uri: SURVEY_URL }} />
16
21
  </SafeAreaView>
17
22
  );
18
23
  };
19
24
 
20
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.1",
3
+ "version": "1.0.3",
4
4
  "description": "For xebo.ai",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -8,6 +8,12 @@
8
8
  },
9
9
  "author": "sheetal",
10
10
  "license": "ISC",
11
- "peerDependencies": {"react": "18.3.1",
12
- "react-native": "0.75.4"}
11
+ "peerDependencies": {
12
+ "react": "18.3.1",
13
+ "react-native": "0.75.4"
14
+ },
15
+ "dependencies": {
16
+ "@react-navigation/native": "^6.1.18",
17
+ "@react-navigation/native-stack": "^6.11.0"
18
+ }
13
19
  }