aboutsummaryrefslogtreecommitdiff
path: root/src/utils/comments.tsx
diff options
context:
space:
mode:
authorShravya Ramesh <37447613+shravyaramesh@users.noreply.github.com>2021-06-22 12:04:50 -0700
committerGitHub <noreply@github.com>2021-06-22 12:04:50 -0700
commit894be3566ccf83bd3ac3af36a1452120cbf19dd3 (patch)
tree875d6a221542fd63bcb35129d3c1999cd9c66d24 /src/utils/comments.tsx
parent59f125070b445dd7fdbab665d939f8a48e22d3fb (diff)
parent53461e8412b1f3b95124f9d9a6f50580d26930f5 (diff)
Merge branch 'master' into tma923-image-cropper
Diffstat (limited to 'src/utils/comments.tsx')
-rw-r--r--src/utils/comments.tsx11
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),