From 22a58b2ad08297b6d5dd3dd241ae23a756ae7552 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Fri, 11 Jun 2021 17:44:24 -0400 Subject: Adjust mention text padding --- src/utils/comments.tsx | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'src/utils') diff --git a/src/utils/comments.tsx b/src/utils/comments.tsx index 161ede0b..910b44e7 100644 --- a/src/utils/comments.tsx +++ b/src/utils/comments.tsx @@ -79,9 +79,9 @@ export const renderTextWithMentions: React.FC = ({ ); }; -export const mentionPartTypes: ( - theme: 'blue' | 'momentCaption' | 'commentPreview', -) => PartType[] = (theme) => { +export const mentionPartTypes: (theme: 'blue' | 'white') => PartType[] = ( + theme, +) => { return [ { trigger: '@', @@ -93,27 +93,21 @@ export const mentionPartTypes: ( ]; }; -const _textStyle: ( - theme: 'blue' | 'momentCaption' | 'commentPreview', -) => StyleProp = (theme) => { +const _textStyle: (theme: 'blue' | 'white') => StyleProp = ( + theme, +) => { switch (theme) { case 'blue': return { color: TAGG_LIGHT_BLUE, top: normalize(3), }; - case 'commentPreview': - return { - color: 'white', - fontWeight: '800', - top: normalize(3), - }; - case 'momentCaption': + case 'white': default: return { color: 'white', fontWeight: '800', - top: normalize(4.5), + top: normalize(3), }; } }; -- cgit v1.2.3-70-g09d2