aboutsummaryrefslogtreecommitdiff
path: root/src/utils/comments.tsx
diff options
context:
space:
mode:
authorBrian Kim <brian@tagg.id>2021-06-15 03:53:00 +0900
committerBrian Kim <brian@tagg.id>2021-06-15 03:53:00 +0900
commitbc2c093e9342ed8deb98652d1c278417dd6435f3 (patch)
treee94fa0e2d270f966c33804ff99179b042febec3b /src/utils/comments.tsx
parent5d8357b7e370a51a5f13b316582bcbcd595566d9 (diff)
Fixed styles for comments vs captions
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 5c17cefe..80786b74 100644
--- a/src/utils/comments.tsx
+++ b/src/utils/comments.tsx
@@ -79,13 +79,16 @@ export const renderTextWithMentions: React.FC<RenderProps> = ({
);
};
-export const mentionPartTypes: (style: 'blue' | 'white') => PartType[] = (
- style,
-) => {
+export const mentionPartTypes: (
+ style: 'blue' | 'white',
+ component: 'caption' | 'comment',
+) => PartType[] = (style, component) => {
return [
{
trigger: '@',
- renderSuggestions: (props) => <TaggTypeahead {...props} />,
+ renderSuggestions: (props) => (
+ <TaggTypeahead component={component} {...props} />
+ ),
allowedSpacesCount: 0,
isInsertSpaceAfterMention: true,
textStyle: