diff options
author | Ivan Chen <ivan@tagg.id> | 2021-05-12 14:57:02 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-05-12 14:57:02 -0400 |
commit | 8fba03a97aa30e10b0a667a49a30c5191146dd49 (patch) | |
tree | b386731da952db328bf3de2075db6ecb809ceb88 /src | |
parent | a1248fc2857850cf8e3a060de6cb47d803a30966 (diff) |
fixed styling
Diffstat (limited to 'src')
-rw-r--r-- | src/screens/badge/BadgeItem.tsx | 20 |
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: { |