fix the edit button

This commit is contained in:
Reinaldo Neto 2023-01-06 18:52:48 -03:00
parent 80c358838f
commit 9c073fa6dc
2 changed files with 10 additions and 2 deletions

View File

@ -5,6 +5,7 @@ import AvatarContainer from './AvatarContainer';
import { IAvatar } from './interfaces'; import { IAvatar } from './interfaces';
import I18n from '../../i18n'; import I18n from '../../i18n';
import { useTheme } from '../../theme'; import { useTheme } from '../../theme';
import { BUTTON_HIT_SLOP } from '../message/utils';
import styles from './styles'; import styles from './styles';
interface IAvatarContainer extends IAvatar { interface IAvatarContainer extends IAvatar {
@ -52,7 +53,9 @@ const AvatarWithEdit = ({
onPress={handleEdit} onPress={handleEdit}
testID='avatar-edit-button' testID='avatar-edit-button'
style={styles.editAvatarButton} style={styles.editAvatarButton}
styleText={[styles.textButton]}
color={colors.titleText} color={colors.titleText}
hitSlop={BUTTON_HIT_SLOP}
/> />
) : null} ) : null}
</> </>

View File

@ -2,9 +2,14 @@ import { StyleSheet } from 'react-native';
export default StyleSheet.create({ export default StyleSheet.create({
editAvatarButton: { editAvatarButton: {
marginTop: 16, marginTop: 8,
paddingVertical: 8, paddingVertical: 8,
paddingHorizontal: 12, paddingHorizontal: 12,
marginBottom: 0 marginBottom: 0,
height: undefined
},
textButton: {
fontSize: 12,
fontWeight: '600'
} }
}); });