react-native-my-survey-sdk 1.0.4 → 1.0.6

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 +4 -10
  3. package/package.json +1 -1
package/ReadMe.md CHANGED
@@ -1 +1 @@
1
- # survey sdk react native
1
+ # survey sdk react
package/index.js CHANGED
@@ -1,20 +1,14 @@
1
- import React, { useContext } from 'react';
1
+ import React from 'react';
2
2
  import { TouchableOpacity, SafeAreaView, Image } from 'react-native';
3
3
  import { WebView } from 'react-native-webview';
4
- import { NavigationContext } from '@react-navigation/native';
5
4
 
6
- const SurveyWebView = ({ url }) => {
7
- const navigation = useContext(NavigationContext);
8
- const SURVEY_URL = url
5
+ const SurveyWebView = ({ url, goBack }) => {
9
6
  return (
10
7
  <SafeAreaView style={{ flex: 1 }}>
11
- <TouchableOpacity
12
- style={{ alignItems: 'flex-end', right: 15 }}
13
- onPress={() => navigation?.goBack()}
14
- >
8
+ <TouchableOpacity style={{ alignItems: 'flex-end', right: 15 }} onPress={goBack}>
15
9
  <Image source={require('./assets/close.png')} style={{ height: 15, width: 20 }} />
16
10
  </TouchableOpacity>
17
- <WebView source={{ uri: SURVEY_URL }} />
11
+ <WebView style = {{height:'20%',width:'40%'}} source={{ uri: url }} />
18
12
  </SafeAreaView>
19
13
  );
20
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-my-survey-sdk",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "For xebo.ai",
5
5
  "main": "index.js",
6
6
  "scripts": {