Skip to content

Commit

Permalink
fix: sum block layout (#2054)
Browse files Browse the repository at this point in the history
  • Loading branch information
devkudasov authored Aug 23, 2024
1 parent c271bc1 commit f0f8ec2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 14 additions & 3 deletions src/components/ui/info-block-amount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ import React, {useState} from 'react';
import {StyleProp, TouchableOpacity, View, ViewStyle} from 'react-native';

import {Color} from '@app/colors';
import {Spacer, Text, TextSum} from '@app/components/ui';
import {
Spacer,
Text,
TextPosition,
TextSum,
TextVariant,
} from '@app/components/ui';
import {createTheme} from '@app/helpers';
import {cleanNumber} from '@app/helpers/clean-number';
import {I18N} from '@app/i18n';
Expand Down Expand Up @@ -52,7 +58,12 @@ export const InfoBlockAmount = ({
return (
<View style={[styles.blockContainer, !isLarge && styles.flexOne, style]}>
<View style={styles.infoBlock}>
<Text t15 center color={Color.textBase2} i18n={titleI18N} />
<Text
variant={TextVariant.t15}
position={TextPosition.center}
color={Color.textBase2}
i18n={titleI18N}
/>
<Spacer height={2} />
{mapValues.slice(0, isShow ? undefined : 2).map((val, id) => (
<TextSum
Expand All @@ -67,7 +78,7 @@ export const InfoBlockAmount = ({
<TouchableOpacity activeOpacity={0.7} onPress={onPressShow}>
<Text
color={Color.textGreen1}
center
position={TextPosition.center}
i18n={
isShow ? I18N.validatorInfoHide : I18N.validatorInfoShowOther
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/sum-block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,6 @@ const styles = createTheme({
paddingHorizontal: 0,
},
inputContainer: {
flex: 5,
flex: 4,
},
});

0 comments on commit f0f8ec2

Please sign in to comment.