Move to new Post components dir
This commit is contained in:
@@ -4,11 +4,11 @@ import {msg, Trans} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
|
||||
import {HITSLOP_10} from '#/lib/constants'
|
||||
import {atoms as a, flatten, type TextStyleProp,useTheme} from '#/alf'
|
||||
import {atoms as a, flatten, type TextStyleProp, useTheme} from '#/alf'
|
||||
import {Button} from '#/components/Button'
|
||||
import {Text} from '#/components/Typography'
|
||||
|
||||
export function ShowMore({
|
||||
export function ShowMoreTextButton({
|
||||
onPress: onPressProp,
|
||||
style,
|
||||
}: TextStyleProp & {onPress: () => void}) {
|
||||
@@ -44,7 +44,8 @@ export function ShowMore({
|
||||
textStyle,
|
||||
{
|
||||
color: t.palette.primary_500,
|
||||
opacity: pressed || hovered ? 0.6 : 1,
|
||||
opacity: pressed ? 0.6 : 1,
|
||||
textDecorationLine: hovered ? 'underline' : undefined,
|
||||
},
|
||||
]}>
|
||||
<Trans>Show More</Trans>
|
||||
@@ -37,9 +37,9 @@ 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 {RichText} from '#/components/RichText'
|
||||
import {ShowMore} from '#/components/ShowMore'
|
||||
import * as Skele from '#/components/Skeleton'
|
||||
import {SubtleWebHover} from '#/components/SubtleWebHover'
|
||||
import {Text} from '#/components/Typography'
|
||||
@@ -310,7 +310,10 @@ const ThreadItemPostInner = memo(function ThreadItemPostInner({
|
||||
shouldProxyLinks={true}
|
||||
/>
|
||||
{limitLines && (
|
||||
<ShowMore style={[a.text_md]} onPress={onPressShowMore} />
|
||||
<ShowMoreTextButton
|
||||
style={[a.text_md]}
|
||||
onPress={onPressShowMore}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
) : undefined}
|
||||
|
||||
@@ -36,9 +36,9 @@ 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 {RichText} from '#/components/RichText'
|
||||
import {ShowMore} from '#/components/ShowMore'
|
||||
import * as Skele from '#/components/Skeleton'
|
||||
import {SubtleWebHover} from '#/components/SubtleWebHover'
|
||||
import {Text} from '#/components/Typography'
|
||||
@@ -354,7 +354,7 @@ const ThreadItemTreePostInner = memo(function ThreadItemTreePostInner({
|
||||
shouldProxyLinks={true}
|
||||
/>
|
||||
{limitLines && (
|
||||
<ShowMore
|
||||
<ShowMoreTextButton
|
||||
style={[a.text_md]}
|
||||
onPress={onPressShowMore}
|
||||
/>
|
||||
|
||||
@@ -62,10 +62,10 @@ 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'
|
||||
import {ShowMore} from '#/components/ShowMore'
|
||||
import {SubtleWebHover} from '#/components/SubtleWebHover'
|
||||
import {Text} from '#/components/Typography'
|
||||
import {VerificationCheckButton} from '#/components/verification/VerificationCheckButton'
|
||||
@@ -687,7 +687,10 @@ let PostThreadItemLoaded = ({
|
||||
shouldProxyLinks={true}
|
||||
/>
|
||||
{limitLines && (
|
||||
<ShowMore style={[a.text_md]} onPress={onPressShowMore} />
|
||||
<ShowMoreTextButton
|
||||
style={[a.text_md]}
|
||||
onPress={onPressShowMore}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
) : undefined}
|
||||
|
||||
@@ -36,10 +36,10 @@ import {ContentHider} from '#/components/moderation/ContentHider'
|
||||
import {LabelsOnMyPost} from '#/components/moderation/LabelsOnMe'
|
||||
import {PostAlerts} from '#/components/moderation/PostAlerts'
|
||||
import {Embed, PostEmbedViewContext} from '#/components/Post/Embed'
|
||||
import {ShowMoreTextButton} from '#/components/Post/ShowMoreTextButton'
|
||||
import {PostControls} from '#/components/PostControls'
|
||||
import {ProfileHoverCard} from '#/components/ProfileHoverCard'
|
||||
import {RichText} from '#/components/RichText'
|
||||
import {ShowMore} from '#/components/ShowMore'
|
||||
import {SubtleWebHover} from '#/components/SubtleWebHover'
|
||||
import * as bsky from '#/types/bsky'
|
||||
|
||||
@@ -237,7 +237,10 @@ function PostInner({
|
||||
shouldProxyLinks={true}
|
||||
/>
|
||||
{limitLines && (
|
||||
<ShowMore style={[a.text_md]} onPress={onPressShowMore} />
|
||||
<ShowMoreTextButton
|
||||
style={[a.text_md]}
|
||||
onPress={onPressShowMore}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
) : undefined}
|
||||
|
||||
@@ -54,11 +54,11 @@ import {PostAlerts} from '#/components/moderation/PostAlerts'
|
||||
import {type AppModerationCause} from '#/components/Pills'
|
||||
import {Embed} from '#/components/Post/Embed'
|
||||
import {PostEmbedViewContext} from '#/components/Post/Embed/types'
|
||||
import {ShowMoreTextButton} from '#/components/Post/ShowMoreTextButton'
|
||||
import {PostControls} from '#/components/PostControls'
|
||||
import {DiscoverDebug} from '#/components/PostControls/DiscoverDebug'
|
||||
import {ProfileHoverCard} from '#/components/ProfileHoverCard'
|
||||
import {RichText} from '#/components/RichText'
|
||||
import {ShowMore} from '#/components/ShowMore'
|
||||
import {SubtleWebHover} from '#/components/SubtleWebHover'
|
||||
import * as bsky from '#/types/bsky'
|
||||
|
||||
@@ -557,7 +557,7 @@ let PostContent = ({
|
||||
shouldProxyLinks={true}
|
||||
/>
|
||||
{limitLines && (
|
||||
<ShowMore style={[a.text_md]} onPress={onPressShowMore} />
|
||||
<ShowMoreTextButton style={[a.text_md]} onPress={onPressShowMore} />
|
||||
)}
|
||||
</>
|
||||
) : undefined}
|
||||
|
||||
Reference in New Issue
Block a user