From f7bc9440a8aa8939cba37655792a73f13ca28b6c Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Tue, 11 May 2021 19:16:09 -0400 Subject: added touchable and fixed format --- src/utils/comments.tsx | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/utils/comments.tsx b/src/utils/comments.tsx index 0d551682..5c17cefe 100644 --- a/src/utils/comments.tsx +++ b/src/utils/comments.tsx @@ -6,9 +6,11 @@ import { Part, PartType, } from 'react-native-controlled-mentions'; +import {TouchableOpacity} from 'react-native-gesture-handler'; import TaggTypeahead from '../components/common/TaggTypeahead'; import {TAGG_LIGHT_BLUE} from '../constants'; import {UserType} from '../types'; +import {normalize} from './layouts'; /** * Part renderer @@ -28,9 +30,8 @@ const renderPart = ( // Mention type part if (isMentionPartType(part.partType)) { return ( - { if (part.data) { handlePress({ @@ -39,8 +40,8 @@ const renderPart = ( }); } }}> - {part.text} - + {part.text} + ); } @@ -89,8 +90,15 @@ export const mentionPartTypes: (style: 'blue' | 'white') => PartType[] = ( isInsertSpaceAfterMention: true, textStyle: style === 'blue' - ? {color: TAGG_LIGHT_BLUE} - : {color: 'white', fontWeight: '800'}, + ? { + color: TAGG_LIGHT_BLUE, + top: normalize(3), + } + : { + color: 'white', + fontWeight: '800', + top: normalize(7.5), + }, }, ]; }; -- cgit v1.2.3-70-g09d2