feat(meridians): display generic content_label under count in standard index cards
This commit is contained in:
parent
06f438b0e0
commit
958229cb0c
|
|
@ -17,6 +17,7 @@ export function MeridianIndexCardRenderer({ item, onPress }: CollectionItemRende
|
||||||
<StandardIndexCard
|
<StandardIndexCard
|
||||||
title={asString(a.name) || item.title}
|
title={asString(a.name) || item.title}
|
||||||
count={asNumber(a.content_count)}
|
count={asNumber(a.content_count)}
|
||||||
|
countLabel={asString(a.content_label) || null}
|
||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ export function StandardIndexCard({
|
||||||
<View style={[styles.countBadge, { backgroundColor: currentTone.soft }]}>
|
<View style={[styles.countBadge, { backgroundColor: currentTone.soft }]}>
|
||||||
<Text style={[styles.countText, { color: currentTone.accent }]}>{count}</Text>
|
<Text style={[styles.countText, { color: currentTone.accent }]}>{count}</Text>
|
||||||
{countLabel ? (
|
{countLabel ? (
|
||||||
<Text numberOfLines={1} style={styles.countLabel}>
|
<Text numberOfLines={1} style={[styles.countLabel, { color: currentTone.accent }]}>
|
||||||
{countLabel}
|
{countLabel}
|
||||||
</Text>
|
</Text>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
@ -117,10 +117,10 @@ const styles = StyleSheet.create({
|
||||||
color: Colors.textSecondary,
|
color: Colors.textSecondary,
|
||||||
},
|
},
|
||||||
countBadge: {
|
countBadge: {
|
||||||
minWidth: moderateScale(34),
|
minWidth: moderateScale(38),
|
||||||
maxWidth: moderateScale(82),
|
maxWidth: moderateScale(82),
|
||||||
paddingHorizontal: moderateScale(9),
|
paddingHorizontal: moderateScale(8),
|
||||||
paddingVertical: verticalScale(6),
|
paddingVertical: verticalScale(5),
|
||||||
borderRadius: moderateScale(12),
|
borderRadius: moderateScale(12),
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
|
|
@ -132,8 +132,8 @@ const styles = StyleSheet.create({
|
||||||
},
|
},
|
||||||
countLabel: {
|
countLabel: {
|
||||||
marginTop: 1,
|
marginTop: 1,
|
||||||
fontSize: moderateScale(9.5),
|
fontSize: moderateScale(9),
|
||||||
lineHeight: moderateScale(12),
|
lineHeight: moderateScale(11),
|
||||||
color: Colors.textSecondary,
|
fontWeight: "600",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue