changed places for save icon

This commit is contained in:
ue 2019-10-01 22:04:21 +03:00
parent e20eecb8b6
commit 1d49d34555
4 changed files with 21 additions and 20 deletions

View File

@ -19,7 +19,7 @@ export default EStyleSheet.create({
saveIcon: { saveIcon: {
fontSize: 20, fontSize: 20,
color: '$iconColor', color: '$iconColor',
marginLeft: 15, width: 50,
}, },
savedIcon: { savedIcon: {
color: '#a1c982', color: '#a1c982',
@ -36,7 +36,6 @@ export default EStyleSheet.create({
quickTitle: { quickTitle: {
fontSize: 10, fontSize: 10,
color: '$iconColor', color: '$iconColor',
marginLeft: 24,
alignSelf: 'center', alignSelf: 'center',
}, },
rightIcon: { rightIcon: {

View File

@ -105,19 +105,11 @@ class BasicHeaderView extends Component {
disabled={disabled} disabled={disabled}
/> />
{isHasIcons && !isReply && ( {isHasIcons && !isReply && (
<View> <DateTimePicker
{!isDraftSaving ? ( type="date-time"
<IconButton onSubmit={this._handleDatePickerChange}
iconStyle={[styles.saveIcon, isDraftSaved && styles.savedIcon]} disabled={!isFormValid}
iconType="MaterialIcons"
name="save"
size={25}
onPress={() => handleOnSaveButtonPress && handleOnSaveButtonPress()}
/> />
) : (
<ActivityIndicator style={styles.textButtonWrapper} />
)}
</View>
)} )}
{!isInputVisible && ( {!isInputVisible && (
@ -184,11 +176,19 @@ class BasicHeaderView extends Component {
{isHasIcons && ( {isHasIcons && (
<Fragment> <Fragment>
{!isReply && ( {!isReply && (
<DateTimePicker <Fragment>
type="date-time" {!isDraftSaving ? (
onSubmit={this._handleDatePickerChange} <IconButton
disabled={!isFormValid} iconStyle={[styles.saveIcon, isDraftSaved && styles.savedIcon]}
iconType="MaterialIcons"
name="save"
size={25}
onPress={() => handleOnSaveButtonPress && handleOnSaveButtonPress()}
/> />
) : (
<ActivityIndicator style={styles.textButtonWrapper} />
)}
</Fragment>
)} )}
<IconButton <IconButton
style={styles.iconButton} style={styles.iconButton}

View File

@ -35,5 +35,6 @@ export default EStyleSheet.create({
}, },
picker: { picker: {
width: 50, width: 50,
marginLeft: 20,
}, },
}); });

View File

@ -1,3 +1,4 @@
/* eslint-disable react/jsx-wrap-multilines */
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import DatePicker from 'react-native-datepicker'; import DatePicker from 'react-native-datepicker';
import moment from 'moment'; import moment from 'moment';