@upstep/react-native 0.6.1 → 0.6.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upstep/react-native",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
4
4
  "description": "Upstep feedback SDK for React Native",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -16,11 +16,13 @@
16
16
  },
17
17
  "peerDependencies": {
18
18
  "react": ">=18",
19
- "react-native": ">=0.73"
19
+ "react-native": ">=0.73",
20
+ "react-native-safe-area-context": ">=4"
20
21
  },
21
22
  "devDependencies": {
22
23
  "@types/react": "^19.0.7",
23
24
  "@types/react-native": "^0.73.0",
25
+ "react-native-safe-area-context": "^5.8.0",
24
26
  "typescript": "^5.7.3"
25
27
  },
26
28
  "keywords": [
@@ -12,9 +12,9 @@ import {
12
12
  ActivityIndicator,
13
13
  useColorScheme,
14
14
  Platform,
15
- SafeAreaView,
16
15
  Linking,
17
16
  } from "react-native";
17
+ import { useSafeAreaInsets } from "react-native-safe-area-context";
18
18
  import type { Comment, Feedback, FeedbackType, FeedbackWithComments } from "@upstep/types";
19
19
  import { useUpstep } from "./FeedbackContext";
20
20
 
@@ -66,6 +66,7 @@ export function FeedbackSheet() {
66
66
  const p = isDark ? DARK : LIGHT;
67
67
 
68
68
  const [nav, setNav] = useState<Nav>({ screen: "list" });
69
+ const insets = useSafeAreaInsets();
69
70
 
70
71
  // Refresh list every time the modal opens
71
72
  useEffect(() => {
@@ -166,19 +167,19 @@ export function FeedbackSheet() {
166
167
  )}
167
168
  </ScrollView>
168
169
 
169
- {/* Branding */}
170
+ {/* Branding + safe-area bottom padding in one strip */}
170
171
  <TouchableOpacity
171
172
  onPress={() => Linking.openURL("https://upstep.dev")}
172
173
  activeOpacity={0.6}
173
- style={[styles.poweredBy, { borderTopColor: p.border }]}
174
+ style={[
175
+ styles.poweredBy,
176
+ { borderTopColor: p.border, paddingBottom: insets.bottom + 10, backgroundColor: p.bg },
177
+ ]}
174
178
  >
175
179
  <Text style={[styles.poweredByText, { color: p.textFaint }]}>
176
180
  Powered by <Text style={{ fontWeight: "700" }}>Upstep.dev</Text>
177
181
  </Text>
178
182
  </TouchableOpacity>
179
-
180
- {/* Safe area spacer — fills the home-indicator / nav-bar zone */}
181
- <SafeAreaView style={{ backgroundColor: p.bg }} />
182
183
  </View>
183
184
  </KeyboardAvoidingView>
184
185
  </Modal>
@@ -251,12 +252,12 @@ function FeedCard({
251
252
  styles.voteBox,
252
253
  {
253
254
  borderColor: voted ? accent : p.border,
254
- backgroundColor: voted ? accent + "1a" : p.bgSoft,
255
+ backgroundColor: voted ? accent : p.bgSoft,
255
256
  },
256
257
  ]}
257
258
  >
258
- <Text style={[styles.voteArrow, { color: accent }]}>▲</Text>
259
- <Text style={[styles.voteCount, { color: p.text }]}>{item.upvotes}</Text>
259
+ <Text style={[styles.voteArrow, { color: voted ? "#fff" : accent }]}>▲</Text>
260
+ <Text style={[styles.voteCount, { color: voted ? "#fff" : p.text }]}>{item.upvotes}</Text>
260
261
  </TouchableOpacity>
261
262
 
262
263
  <View style={styles.cardBody}>