@upstep/react-native 0.6.13 → 0.6.14
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 +5 -0
- package/package.json +1 -1
- package/src/FeedbackSheet.tsx +22 -1
- package/.turbo/turbo-type-check.log +0 -4
package/CHANGELOG.md
ADDED
package/package.json
CHANGED
package/src/FeedbackSheet.tsx
CHANGED
|
@@ -280,6 +280,7 @@ function FeedCard({
|
|
|
280
280
|
: <StatusDot status={item.status} />}
|
|
281
281
|
<Text style={[styles.cardDate, { color: p.textFaint }]}>{fmtDate(item.createdAt)}</Text>
|
|
282
282
|
</View>
|
|
283
|
+
<LabelBadges labels={item.labels} p={p} />
|
|
283
284
|
</View>
|
|
284
285
|
|
|
285
286
|
<Text style={[styles.chevron, { color: p.textFaint }]}>›</Text>
|
|
@@ -338,6 +339,7 @@ function FeedDetailBody({
|
|
|
338
339
|
{item.status === "PENDING"
|
|
339
340
|
? <PendingBadge />
|
|
340
341
|
: <StatusBadge status={item.status} p={p} />}
|
|
342
|
+
<LabelBadges labels={item.labels} p={p} />
|
|
341
343
|
</View>
|
|
342
344
|
|
|
343
345
|
<Text style={[styles.detailContent, { color: p.textSoft }]}>{item.content}</Text>
|
|
@@ -560,6 +562,21 @@ function StatusBadge({ status, p }: { status: string; p: Palette }) {
|
|
|
560
562
|
);
|
|
561
563
|
}
|
|
562
564
|
|
|
565
|
+
function LabelBadges({ labels, p }: { labels: Feedback["labels"]; p: Palette }) {
|
|
566
|
+
if (!labels?.length) return null;
|
|
567
|
+
|
|
568
|
+
return (
|
|
569
|
+
<View style={styles.labelBadges}>
|
|
570
|
+
{labels.map((label) => (
|
|
571
|
+
<View key={label.id} style={[styles.labelBadge, { backgroundColor: p.bgSoft, borderColor: label.color }]}>
|
|
572
|
+
<View style={[styles.labelDot, { backgroundColor: label.color }]} />
|
|
573
|
+
<Text style={[styles.labelBadgeText, { color: p.textSoft }]} numberOfLines={1}>{label.name}</Text>
|
|
574
|
+
</View>
|
|
575
|
+
))}
|
|
576
|
+
</View>
|
|
577
|
+
);
|
|
578
|
+
}
|
|
579
|
+
|
|
563
580
|
function fmtDate(iso: string) {
|
|
564
581
|
return new Date(iso).toLocaleDateString(undefined, { month: "short", day: "numeric" });
|
|
565
582
|
}
|
|
@@ -641,12 +658,16 @@ const styles = StyleSheet.create({
|
|
|
641
658
|
cardDesc: { fontSize: 12.5, lineHeight: 17, marginBottom: 6 },
|
|
642
659
|
cardMeta: { flexDirection: "row", alignItems: "center", gap: 6 },
|
|
643
660
|
cardDate: { fontSize: 11 },
|
|
661
|
+
labelBadges: { flexDirection: "row", flexWrap: "wrap", gap: 6, marginTop: 7 },
|
|
662
|
+
labelBadge: { flexDirection: "row", alignItems: "center", gap: 5, borderWidth: 1, borderRadius: 10, paddingHorizontal: 7, paddingVertical: 3, maxWidth: "100%" },
|
|
663
|
+
labelDot: { width: 6, height: 6, borderRadius: 3 },
|
|
664
|
+
labelBadgeText: { fontSize: 11, fontWeight: "500", flexShrink: 1 },
|
|
644
665
|
chevron: { fontSize: 22, fontWeight: "300", marginLeft: 4 },
|
|
645
666
|
|
|
646
667
|
// Detail
|
|
647
668
|
detailPad: { paddingTop: 4 },
|
|
648
669
|
detailTitle: { fontSize: 22, fontWeight: "700", letterSpacing: -0.4, marginBottom: 10, lineHeight: 28 },
|
|
649
|
-
badgeRow: { flexDirection: "row", gap: 8, marginBottom: 16 },
|
|
670
|
+
badgeRow: { flexDirection: "row", flexWrap: "wrap", gap: 8, marginBottom: 16 },
|
|
650
671
|
detailContent: { fontSize: 15, lineHeight: 23, marginBottom: 24 },
|
|
651
672
|
upvoteBtn: {
|
|
652
673
|
flexDirection: "row", alignItems: "center", gap: 8,
|