aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/screens/badge/BadgeItem.tsx20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/screens/badge/BadgeItem.tsx b/src/screens/badge/BadgeItem.tsx
index 1051d4a7..409cc429 100644
--- a/src/screens/badge/BadgeItem.tsx
+++ b/src/screens/badge/BadgeItem.tsx
@@ -44,7 +44,15 @@ const BadgeItem: React.FC<BadgeItemProps> = ({
<View style={styles.detailContainer}>
<Image source={resourcePath} style={styles.imageStyles} />
<View style={styles.textContainer}>
- <Text style={styles.title}>{title}</Text>
+ <Text
+ style={[
+ styles.title,
+ title.length > 30
+ ? {fontSize: normalize(12), lineHeight: normalize(16)}
+ : {},
+ ]}>
+ {title}
+ </Text>
</View>
</View>
</LinearGradient>
@@ -53,17 +61,19 @@ const BadgeItem: React.FC<BadgeItemProps> = ({
);
};
+const ITEM_WIDTH = SCREEN_WIDTH / 3 - 20;
+
const styles = StyleSheet.create({
border: {
- width: SCREEN_WIDTH / 3 - 20 + 6,
- height: 146,
+ width: ITEM_WIDTH + 6,
+ height: 156,
marginLeft: 10,
marginBottom: 12,
borderRadius: 8,
},
item: {
- width: SCREEN_WIDTH / 3 - 20,
- height: 140,
+ width: ITEM_WIDTH,
+ height: 150,
borderRadius: 8,
},
detailContainer: {