diff options
author | Brian Kim <brian@tagg.id> | 2021-06-15 03:53:00 +0900 |
---|---|---|
committer | Brian Kim <brian@tagg.id> | 2021-06-15 03:53:00 +0900 |
commit | bc2c093e9342ed8deb98652d1c278417dd6435f3 (patch) | |
tree | e94fa0e2d270f966c33804ff99179b042febec3b /src/utils/comments.tsx | |
parent | 5d8357b7e370a51a5f13b316582bcbcd595566d9 (diff) |
Fixed styles for comments vs captions
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 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: |