@upstep/react-native 0.6.14 → 0.6.15
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/CHANGELOG.md +4 -0
- package/package.json +2 -2
- package/src/FeedbackSheet.tsx +11 -7
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@upstep/react-native",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.15",
|
|
4
4
|
"description": "Upstep feedback SDK for React Native",
|
|
5
5
|
"homepage": "https://upstep.dev",
|
|
6
6
|
"repository": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@upstep/types": "0.5.
|
|
22
|
+
"@upstep/types": "0.5.6"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@react-native-async-storage/async-storage": ">=1.18",
|
package/src/FeedbackSheet.tsx
CHANGED
|
@@ -277,7 +277,7 @@ function FeedCard({
|
|
|
277
277
|
<TypeBadge type={item.type} p={p} />
|
|
278
278
|
{item.status === "PENDING"
|
|
279
279
|
? <PendingBadge />
|
|
280
|
-
: <StatusDot status={item.status} />}
|
|
280
|
+
: <StatusDot status={item.status} color={item.boardStatus?.color} />}
|
|
281
281
|
<Text style={[styles.cardDate, { color: p.textFaint }]}>{fmtDate(item.createdAt)}</Text>
|
|
282
282
|
</View>
|
|
283
283
|
<LabelBadges labels={item.labels} p={p} />
|
|
@@ -338,7 +338,7 @@ function FeedDetailBody({
|
|
|
338
338
|
<TypeBadge type={item.type} p={p} />
|
|
339
339
|
{item.status === "PENDING"
|
|
340
340
|
? <PendingBadge />
|
|
341
|
-
: <StatusBadge status={item.status} p={p} />}
|
|
341
|
+
: <StatusBadge status={item.status} boardStatus={item.boardStatus} p={p} />}
|
|
342
342
|
<LabelBadges labels={item.labels} p={p} />
|
|
343
343
|
</View>
|
|
344
344
|
|
|
@@ -549,15 +549,19 @@ const STATUS_COLOR: Record<string, string> = {
|
|
|
549
549
|
PENDING: "#ea580c", CLOSED: "#6b7280",
|
|
550
550
|
};
|
|
551
551
|
|
|
552
|
-
function StatusDot({ status }: { status: string }) {
|
|
553
|
-
return <View style={[styles.statusDot, { backgroundColor: STATUS_COLOR[status] ?? "#9ca3af" }]} />;
|
|
552
|
+
function StatusDot({ status, color }: { status: string; color?: string }) {
|
|
553
|
+
return <View style={[styles.statusDot, { backgroundColor: color ?? STATUS_COLOR[status] ?? "#9ca3af" }]} />;
|
|
554
554
|
}
|
|
555
555
|
|
|
556
|
-
function StatusBadge({
|
|
556
|
+
function StatusBadge({
|
|
557
|
+
status, boardStatus, p,
|
|
558
|
+
}: {
|
|
559
|
+
status: string; boardStatus: Feedback["boardStatus"]; p: Palette;
|
|
560
|
+
}) {
|
|
557
561
|
return (
|
|
558
562
|
<View style={[styles.statusBadge, { backgroundColor: p.bgSoft, borderColor: p.border }]}>
|
|
559
|
-
<StatusDot status={status} />
|
|
560
|
-
<Text style={[styles.statusBadgeText, { color: p.textSoft }]}>{status.replace("_", " ")}</Text>
|
|
563
|
+
<StatusDot status={status} color={boardStatus?.color} />
|
|
564
|
+
<Text style={[styles.statusBadgeText, { color: p.textSoft }]}>{boardStatus?.name ?? status.replace("_", " ")}</Text>
|
|
561
565
|
</View>
|
|
562
566
|
);
|
|
563
567
|
}
|