Skip to content

Commit

Permalink
fix(earn): fix wrapping and alignments on pool info screen (#6143)
Browse files Browse the repository at this point in the history
  • Loading branch information
jh2oman authored Oct 10, 2024
1 parent edf6d3b commit aa2fe7d
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/earn/EarnPoolInfoScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,14 +298,16 @@ function YieldCard({
return (
<View style={styles.cardLineContainer} key={index}>
<View style={styles.cardLineLabel}>
<Text numberOfLines={1} style={styles.cardLabelText}>
{rate.label}
</Text>
<TokenIcons
tokensInfo={tokenInfo}
size={IconSize.XXSMALL}
showNetworkIcon={false}
/>
<View style={styles.yieldRateLabelContainer}>
<Text numberOfLines={1} style={styles.cardLabelText}>
{rate.label}
</Text>
<TokenIcons
tokensInfo={tokenInfo}
size={IconSize.XXSMALL}
showNetworkIcon={false}
/>
</View>
</View>
<Text style={styles.cardLabelText}>
{t('earnFlow.poolInfoScreen.ratePercent', { rate: rate.percentage.toFixed(2) })}
Expand Down Expand Up @@ -757,6 +759,7 @@ const styles = StyleSheet.create({
tokenIconsContainer: {
flex: 1,
flexDirection: 'row',
alignItems: 'center',
},
contentContainer: {
gap: Spacing.Regular16,
Expand All @@ -772,15 +775,13 @@ const styles = StyleSheet.create({
flex: 1,
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
},
cardLineLabel: {
flex: 1,
paddingRight: 20, // Prevents Icon from being cut off on long labels
},
yieldRateLabelContainer: {
flexDirection: 'row',
gap: Spacing.Tiny4,
alignItems: 'center',
paddingRight: 20, // Prevents Icon from being cut off on long labels
minWidth: '35%',
},
cardTitleText: {
...typeScale.labelSemiBoldMedium,
Expand Down

0 comments on commit aa2fe7d

Please sign in to comment.