react-native-my-survey-sdk 2.1.8 → 2.1.9
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/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
|
|
2
|
+
import { View, Text, TouchableOpacity, StyleSheet, ScrollView } from 'react-native';
|
|
3
3
|
import { XeboSurveyPage } from '../models/XeboModels';
|
|
4
4
|
import { getTheme } from '../theme/XeboTheme';
|
|
5
5
|
|
|
@@ -13,11 +13,18 @@ export const XeboIntroView: React.FC<Props> = ({ introPage, onStart }) => {
|
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
15
|
<View style={styles.container}>
|
|
16
|
-
{
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
{/* Scrollable content area — button stays pinned below no matter how long the text */}
|
|
17
|
+
<ScrollView
|
|
18
|
+
style={styles.scroll}
|
|
19
|
+
contentContainerStyle={styles.scrollContent}
|
|
20
|
+
showsVerticalScrollIndicator={false}
|
|
21
|
+
>
|
|
22
|
+
{!!introPage.content && (
|
|
23
|
+
<Text style={[styles.content, { color: theme.textColor, fontFamily: theme.fontFamily }]}>
|
|
24
|
+
{introPage.content}
|
|
25
|
+
</Text>
|
|
26
|
+
)}
|
|
27
|
+
</ScrollView>
|
|
21
28
|
|
|
22
29
|
<TouchableOpacity
|
|
23
30
|
style={[styles.button, { backgroundColor: theme.primaryColor, borderRadius: theme.cornerRadius }]}
|
|
@@ -38,17 +45,22 @@ const styles = StyleSheet.create({
|
|
|
38
45
|
paddingHorizontal: 20,
|
|
39
46
|
paddingTop: 16,
|
|
40
47
|
paddingBottom: 24,
|
|
41
|
-
|
|
48
|
+
},
|
|
49
|
+
scroll: {
|
|
50
|
+
flex: 1,
|
|
51
|
+
},
|
|
52
|
+
scrollContent: {
|
|
53
|
+
flexGrow: 1,
|
|
54
|
+
paddingBottom: 8,
|
|
42
55
|
},
|
|
43
56
|
content: {
|
|
44
57
|
fontSize: 16,
|
|
45
58
|
lineHeight: 24,
|
|
46
|
-
flexShrink: 1,
|
|
47
59
|
},
|
|
48
60
|
button: {
|
|
49
61
|
paddingVertical: 14,
|
|
50
62
|
alignItems: 'center',
|
|
51
|
-
marginTop:
|
|
63
|
+
marginTop: 12,
|
|
52
64
|
},
|
|
53
65
|
buttonText: {
|
|
54
66
|
color: '#FFFFFF',
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
StyleSheet,
|
|
7
7
|
Dimensions,
|
|
8
8
|
Platform,
|
|
9
|
-
KeyboardAvoidingView,
|
|
10
9
|
} from 'react-native';
|
|
11
10
|
import RNModal from 'react-native-modal';
|
|
12
11
|
import { XeboSurveyManager, XEBO_EVENTS } from '../core/XeboSurveyManager';
|
|
@@ -216,12 +215,9 @@ export const XeboSurveyModal: React.FC = () => {
|
|
|
216
215
|
hideModalContentWhileAnimating={true}
|
|
217
216
|
coverScreen={true}
|
|
218
217
|
propagateSwipe={false}
|
|
218
|
+
avoidKeyboard={true}
|
|
219
219
|
onModalHide={() => setSurvey(null)}
|
|
220
220
|
>
|
|
221
|
-
<KeyboardAvoidingView
|
|
222
|
-
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
223
|
-
keyboardVerticalOffset={0}
|
|
224
|
-
>
|
|
225
221
|
<View
|
|
226
222
|
style={[
|
|
227
223
|
styles.sheet,
|
|
@@ -251,7 +247,6 @@ export const XeboSurveyModal: React.FC = () => {
|
|
|
251
247
|
{/* Safe area bottom padding — home indicator on iOS, gesture nav on Android */}
|
|
252
248
|
<View style={{ height: bottomInset }} />
|
|
253
249
|
</View>
|
|
254
|
-
</KeyboardAvoidingView>
|
|
255
250
|
</RNModal>
|
|
256
251
|
);
|
|
257
252
|
};
|