react-native-my-survey-sdk 3.0.5 → 3.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XeboRatingView.d.ts","sourceRoot":"","sources":["../../src/components/XeboRatingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAWhD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGhE,UAAU,KAAK;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;CACxC;
|
|
1
|
+
{"version":3,"file":"XeboRatingView.d.ts","sourceRoot":"","sources":["../../src/components/XeboRatingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAWhD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGhE,UAAU,KAAK;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;CACxC;AAsID,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA6I1C,CAAC"}
|
|
@@ -84,16 +84,10 @@ function FlatEmoji({ index, selected }) {
|
|
|
84
84
|
function RatingIcon({ style, index, selected, filled, color, }) {
|
|
85
85
|
const activeColor = color || '#F59E0B';
|
|
86
86
|
switch (style) {
|
|
87
|
-
case 'heart':
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
backgroundColor: filled ? activeColor : 'transparent',
|
|
92
|
-
borderWidth: filled ? 0 : 2,
|
|
93
|
-
borderColor: activeColor,
|
|
94
|
-
opacity: filled ? 1 : 0.4,
|
|
95
|
-
}}/>);
|
|
96
|
-
}
|
|
87
|
+
case 'heart':
|
|
88
|
+
return (<react_native_1.Text style={{ fontSize: 34, color: filled ? activeColor : '#E5E7EB' }}>
|
|
89
|
+
{filled ? '♥' : '♡'}
|
|
90
|
+
</react_native_1.Text>);
|
|
97
91
|
case 'circle':
|
|
98
92
|
return (<react_native_1.View style={{
|
|
99
93
|
width: 38,
|
|
@@ -130,22 +124,10 @@ function RatingIcon({ style, index, selected, filled, color, }) {
|
|
|
130
124
|
return <FlatEmoji index={index} selected={selected}/>;
|
|
131
125
|
}
|
|
132
126
|
case 'star':
|
|
133
|
-
default:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
backgroundColor: filled ? activeColor : 'transparent',
|
|
138
|
-
borderWidth: 2,
|
|
139
|
-
borderColor: filled ? activeColor : '#D1D5DB',
|
|
140
|
-
alignItems: 'center',
|
|
141
|
-
justifyContent: 'center',
|
|
142
|
-
}}>
|
|
143
|
-
{filled && (<react_native_1.View style={{
|
|
144
|
-
width: 16, height: 16, borderRadius: 8,
|
|
145
|
-
backgroundColor: '#FFF',
|
|
146
|
-
}}/>)}
|
|
147
|
-
</react_native_1.View>);
|
|
148
|
-
}
|
|
127
|
+
default:
|
|
128
|
+
return (<react_native_1.Text style={{ fontSize: 34, color: filled ? activeColor : '#E5E7EB' }}>
|
|
129
|
+
{filled ? '★' : '☆'}
|
|
130
|
+
</react_native_1.Text>);
|
|
149
131
|
}
|
|
150
132
|
}
|
|
151
133
|
const XeboRatingView = ({ question, isLastQuestion, onAnswer }) => {
|
|
@@ -248,8 +230,8 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
248
230
|
scrollContent: { paddingTop: 16, paddingBottom: 8 },
|
|
249
231
|
title: { fontSize: 18, fontWeight: '700', marginBottom: 16 },
|
|
250
232
|
subtitle: { fontSize: 14, opacity: 0.6, marginBottom: 16 },
|
|
251
|
-
iconsRow: { flexDirection: 'row', marginTop: 4, marginBottom: 20, flexWrap: 'nowrap', justifyContent: 'center', gap:
|
|
252
|
-
iconButton: { alignItems: 'center', justifyContent: 'center' },
|
|
233
|
+
iconsRow: { flexDirection: 'row', marginTop: 4, marginBottom: 20, flexWrap: 'nowrap', justifyContent: 'center', gap: 16 },
|
|
234
|
+
iconButton: { alignItems: 'center', justifyContent: 'center', padding: 4 },
|
|
253
235
|
colLabels: {
|
|
254
236
|
flexDirection: 'row',
|
|
255
237
|
justifyContent: 'space-between',
|