diff options
author | Ivan Chen <ivan@tagg.id> | 2021-06-18 13:54:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-18 13:54:08 -0400 |
commit | 53461e8412b1f3b95124f9d9a6f50580d26930f5 (patch) | |
tree | 44647b93c36ef4e99c5243f38e0b98427cb27de4 /src/utils/comments.tsx | |
parent | 78f32c1400eff46d4c768b78fbaf672826c74285 (diff) | |
parent | 6fcd7b41cd763e95733187c6c4d48ddb6e9bd01a (diff) |
Merge pull request #467 from brian-tagg/tma869-adjust-mentions
[TMA-869] adjust mentions
Diffstat (limited to 'src/utils/comments.tsx')
-rw-r--r-- | src/utils/comments.tsx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/utils/comments.tsx b/src/utils/comments.tsx index 910b44e7..28879622 100644 --- a/src/utils/comments.tsx +++ b/src/utils/comments.tsx @@ -79,13 +79,16 @@ export const renderTextWithMentions: React.FC<RenderProps> = ({ ); }; -export const mentionPartTypes: (theme: 'blue' | 'white') => PartType[] = ( - theme, -) => { +export const mentionPartTypes: ( + theme: 'blue' | 'white', + component: 'caption' | 'comment', +) => PartType[] = (theme, component) => { return [ { trigger: '@', - renderSuggestions: (props) => <TaggTypeahead {...props} />, + renderSuggestions: (props) => ( + <TaggTypeahead component={component} {...props} /> + ), allowedSpacesCount: 0, isInsertSpaceAfterMention: true, textStyle: _textStyle(theme), |