diff options
author | Samuel Newman <mozzius@protonmail.com> | 2025-06-14 00:43:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-13 16:43:17 -0500 |
commit | 00469314ca2f76bf13d0526afdd6c9253c0953d1 (patch) | |
tree | b21d41d3eac86d3c135c9d701f65a1be47d09ee4 /src/view/com/post-thread/PostThreadItem.tsx | |
parent | ed9691511beb26bdb799bbcb9a973a8b8df3433c (diff) | |
download | voidsky-00469314ca2f76bf13d0526afdd6c9253c0953d1.tar.zst |
Use Button instead of TextLink for show more button (#8480)
* use button instead of TextLink for show more * Match post text size, provide interaction feedback * Move to new Post components dir * Prettier --------- Co-authored-by: Eric Bailey <git@esb.lol>
Diffstat (limited to 'src/view/com/post-thread/PostThreadItem.tsx')
-rw-r--r-- | src/view/com/post-thread/PostThreadItem.tsx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 15f5539c9..592224ff5 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -44,7 +44,7 @@ import {useMergedThreadgateHiddenReplies} from '#/state/threadgate-hidden-replie import {type PostSource} from '#/state/unstable-post-source' import {PostThreadFollowBtn} from '#/view/com/post-thread/PostThreadFollowBtn' import {ErrorMessage} from '#/view/com/util/error/ErrorMessage' -import {Link, TextLink} from '#/view/com/util/Link' +import {Link} from '#/view/com/util/Link' import {formatCount} from '#/view/com/util/numeric/format' import {PostMeta} from '#/view/com/util/PostMeta' import {PreviewableUserAvatar} from '#/view/com/util/UserAvatar' @@ -62,6 +62,7 @@ import {PostAlerts} from '#/components/moderation/PostAlerts' import {PostHider} from '#/components/moderation/PostHider' import {type AppModerationCause} from '#/components/Pills' import {Embed, PostEmbedViewContext} from '#/components/Post/Embed' +import {ShowMoreTextButton} from '#/components/Post/ShowMoreTextButton' import {PostControls} from '#/components/PostControls' import * as Prompt from '#/components/Prompt' import {RichText} from '#/components/RichText' @@ -685,16 +686,14 @@ let PostThreadItemLoaded = ({ authorHandle={post.author.handle} shouldProxyLinks={true} /> + {limitLines && ( + <ShowMoreTextButton + style={[a.text_md]} + onPress={onPressShowMore} + /> + )} </View> ) : undefined} - {limitLines ? ( - <TextLink - text={_(msg`Show More`)} - style={pal.link} - onPress={onPressShowMore} - href="#" - /> - ) : undefined} {post.embed && ( <View style={[a.pb_xs]}> <Embed |