aboutsummaryrefslogtreecommitdiff
path: root/src/utils/comments.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/comments.tsx')
-rw-r--r--src/utils/comments.tsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/utils/comments.tsx b/src/utils/comments.tsx
index a1f353d6..c0b522f2 100644
--- a/src/utils/comments.tsx
+++ b/src/utils/comments.tsx
@@ -43,6 +43,11 @@ const renderPart = (part: Part, index: number) => {
);
};
+interface RenderProps {
+ value: string;
+ partTypes: PartType[];
+}
+
/**
* Value renderer. Parsing value to parts array and then mapping the array using 'renderPart'
*
@@ -51,7 +56,10 @@ const renderPart = (part: Part, index: number) => {
* @param value - value from MentionInput
* @param partTypes - the part types array that you providing to MentionInput
*/
-export const renderValue: React.FC = (value: string, partTypes: PartType[]) => {
+export const renderTextWithMentions: React.FC<RenderProps> = ({
+ value,
+ partTypes,
+}) => {
const {parts} = parseValue(value, partTypes);
return <Text>{parts.map(renderPart)}</Text>;
};