updated input description gap

This commit is contained in:
Sadaqat Ali 2022-07-20 20:36:53 +05:00
parent 44f5e59e2d
commit 41fb589565
3 changed files with 15 additions and 4 deletions

View File

@ -100,6 +100,8 @@ const TransferAmountInputSection = ({
}
/>
<TransferFormItem
rightComponentStyle={styles.transferItemRightStyle}
containerStyle={styles.transferItemContainer}
rightComponent={() => (
<TouchableOpacity onPress={() => _handleOnChange('amount', balance)}>
{_renderDescription(
@ -128,7 +130,8 @@ const TransferAmountInputSection = ({
)}
{(transferType === transferTypes.POINTS || transferType === transferTypes.TRANSFER_TOKEN) && (
<TransferFormItem
containerStyle={{ marginTop: 20 }}
rightComponentStyle={styles.transferItemRightStyle}
containerStyle={styles.transferItemContainer}
rightComponent={() =>
_renderDescription(intl.formatMessage({ id: 'transfer.memo_desc' }))
}

View File

@ -51,6 +51,12 @@ export default EStyleSheet.create({
fontSize: 12,
color: '$primaryBlack',
fontWeight: '600',
textAlign: 'left',
textAlign: 'right',
},
transferItemContainer: {
height: 20,
},
transferItemRightStyle: {
justifyContent: 'flex-end',
}
});

View File

@ -7,10 +7,12 @@ import styles from './transferFormItemStyles';
* @prop { type } name - Description....
*/
const TransferFormItemView = ({ rightComponent, label, containerStyle }) => (
const TransferFormItemView = ({ rightComponent, label, containerStyle, rightComponentStyle }) => (
<View style={[styles.container, containerStyle]}>
<View style={styles.leftPart}>{label && <Text style={styles.text}>{label}</Text>}</View>
<View style={styles.rightPart}>{rightComponent && rightComponent()}</View>
<View style={[styles.rightPart, rightComponentStyle]}>
{rightComponent && rightComponent()}
</View>
</View>
);