From 74880acadde93ce6c1898ba7fe94d290250a0351 Mon Sep 17 00:00:00 2001 From: en Date: Fri, 14 Feb 2025 13:11:53 +0100 Subject: [PATCH] feat(comment): show sticky hide full button on top --- src/components/comment/CommentContent.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/components/comment/CommentContent.tsx b/src/components/comment/CommentContent.tsx index 4b6db38..1657d89 100644 --- a/src/components/comment/CommentContent.tsx +++ b/src/components/comment/CommentContent.tsx @@ -1,13 +1,26 @@ -import { useTextLimit } from 'hooks/useTextLimit' +import { NoteRender } from 'components/Notes/NoteRender' +import { useTextLimit } from 'hooks' + interface CommentContentProps { content: string } + export const CommentContent = ({ content }: CommentContentProps) => { const { text, isTextOverflowing, isExpanded, toggle } = useTextLimit(content) return ( <> -

{text}

+ {isExpanded && ( +
+

Hide full post

+
+ )} +

+ +

{isTextOverflowing && (

{isExpanded ? 'Hide' : 'View'} full post