changed minus place and enhanced

This commit is contained in:
u-e 2019-07-29 23:34:00 +03:00
parent 0db97ab585
commit 592e3969cf
2 changed files with 77 additions and 76 deletions

View File

@ -43,7 +43,6 @@ class BoostPostScreen extends PureComponent {
SCPath: '', SCPath: '',
permlinkSuggestions: [], permlinkSuggestions: [],
isValid: false, isValid: false,
calculatedESTM: 150,
}; };
this.startActionSheet = React.createRef(); this.startActionSheet = React.createRef();
@ -192,7 +191,6 @@ class BoostPostScreen extends PureComponent {
} }
/> />
<Text style={styles.balanceText}>{`${balance || _balance} ESTM`}</Text> <Text style={styles.balanceText}>{`${balance || _balance} ESTM`}</Text>
<Fragment>
<View style={styles.autocomplateLineContainer}> <View style={styles.autocomplateLineContainer}>
<View style={styles.autocomplateLabelContainer}> <View style={styles.autocomplateLabelContainer}>
{ {
@ -236,41 +234,17 @@ class BoostPostScreen extends PureComponent {
)} )}
/> />
</View> </View>
</Fragment>
<View style={styles.total}> <View style={styles.total}>
<Text style={styles.day}> <Text style={styles.price}>
{`${getESTMPrice(calculatedESTM).toFixed(3)} $ `} {`${getESTMPrice(calculatedESTM).toFixed(3)} $ `}
</Text> </Text>
<Text style={styles.price}>{`${calculatedESTM} ESTM`}</Text> <Text style={styles.esteem}>{`${calculatedESTM} ESTM`}</Text>
</View> </View>
<View <View style={styles.quickButtonsWrapper}>
style={{
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row',
}}
>
<MainButton <MainButton
style={{ width: 55, height: 55, justifyContent: 'center' }} style={styles.quickButtons}
isDisable={!(_balance / 50 > factor + 4)}
onPress={() =>
this.setState({
factor: _balance / 50 > factor + 4 ? factor + 1 : factor,
})
}
>
<Icon
size={24}
style={{ color: 'white' }}
iconType="MaterialIcons"
name="add"
/>
</MainButton>
<MainButton
style={{ width: 55, height: 55, justifyContent: 'center' }}
isDisable={!(calculatedESTM > 150)} isDisable={!(calculatedESTM > 150)}
onPress={() => onPress={() =>
this.setState({ this.setState({
@ -285,6 +259,23 @@ class BoostPostScreen extends PureComponent {
name="minus" name="minus"
/> />
</MainButton> </MainButton>
<MainButton
style={styles.quickButtons}
isDisable={!(_balance / 50 > factor + 4)}
onPress={() =>
this.setState({
factor: _balance / 50 > factor + 4 ? factor + 1 : factor,
})
}
>
<Icon
size={24}
style={{ color: 'white' }}
iconType="MaterialIcons"
name="add"
/>
</MainButton>
</View> </View>
</View> </View>

View File

@ -150,13 +150,23 @@ export default EStyleSheet.create({
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
}, },
day: { price: {
fontSize: 22, fontSize: 22,
color: '$primaryBlue', color: '$primaryBlue',
fontWeight: 'bold', fontWeight: 'bold',
}, },
price: { esteem: {
fontSize: 15, fontSize: 15,
color: '$primaryBlue', color: '$primaryBlue',
}, },
quickButtons: {
width: 55,
height: 55,
justifyContent: 'center',
},
quickButtonsWrapper: {
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row',
},
}); });