From 9c073fa6dc375506015b9f1e43c1778b54d8a5ba Mon Sep 17 00:00:00 2001 From: Reinaldo Neto Date: Fri, 6 Jan 2023 18:52:48 -0300 Subject: [PATCH] fix the edit button --- app/containers/Avatar/AvatarWithEdit.tsx | 3 +++ app/containers/Avatar/styles.ts | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/containers/Avatar/AvatarWithEdit.tsx b/app/containers/Avatar/AvatarWithEdit.tsx index 236d3cfc5..1ea5dc9f0 100644 --- a/app/containers/Avatar/AvatarWithEdit.tsx +++ b/app/containers/Avatar/AvatarWithEdit.tsx @@ -5,6 +5,7 @@ import AvatarContainer from './AvatarContainer'; import { IAvatar } from './interfaces'; import I18n from '../../i18n'; import { useTheme } from '../../theme'; +import { BUTTON_HIT_SLOP } from '../message/utils'; import styles from './styles'; interface IAvatarContainer extends IAvatar { @@ -52,7 +53,9 @@ const AvatarWithEdit = ({ onPress={handleEdit} testID='avatar-edit-button' style={styles.editAvatarButton} + styleText={[styles.textButton]} color={colors.titleText} + hitSlop={BUTTON_HIT_SLOP} /> ) : null} diff --git a/app/containers/Avatar/styles.ts b/app/containers/Avatar/styles.ts index 5a43fd029..1543ca5bd 100644 --- a/app/containers/Avatar/styles.ts +++ b/app/containers/Avatar/styles.ts @@ -2,9 +2,14 @@ import { StyleSheet } from 'react-native'; export default StyleSheet.create({ editAvatarButton: { - marginTop: 16, + marginTop: 8, paddingVertical: 8, paddingHorizontal: 12, - marginBottom: 0 + marginBottom: 0, + height: undefined + }, + textButton: { + fontSize: 12, + fontWeight: '600' } });