From c9fc9a4298dda70b721aec007813a8adb3e97e18 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 8 Jul 2025 12:29:32 +0300 Subject: [PATCH] fix quote padding not being pressable --- src/components/Post/Embed/index.tsx | 106 ++++++++++----------- src/components/moderation/ContentHider.tsx | 13 ++- 2 files changed, 59 insertions(+), 60 deletions(-) diff --git a/src/components/Post/Embed/index.tsx b/src/components/Post/Embed/index.tsx index ace85dc984..9c5444b27d 100644 --- a/src/components/Post/Embed/index.tsx +++ b/src/components/Post/Embed/index.tsx @@ -268,64 +268,60 @@ export function QuoteEmbed({ const [hover, setHover] = React.useState(false) return ( { - setHover(true) - }} - onPointerLeave={() => { - setHover(false) - }}> + style={[a.mt_sm]} + onPointerEnter={() => setHover(true)} + onPointerLeave={() => setHover(false)}> - - - - - - {moderation ? ( - - ) : null} - {richText ? ( - - ) : null} - {quote.embed && ( - - )} - + {({active}) => ( + <> + {!active && } + + + + + {moderation ? ( + + ) : null} + {richText ? ( + + ) : null} + {quote.embed && ( + + )} + + + )} ) diff --git a/src/components/moderation/ContentHider.tsx b/src/components/moderation/ContentHider.tsx index 9e94a413c6..549a1b9f0a 100644 --- a/src/components/moderation/ContentHider.tsx +++ b/src/components/moderation/ContentHider.tsx @@ -23,20 +23,23 @@ export function ContentHider({ modui, ignoreMute, style, + activeStyle, childContainerStyle, children, -}: React.PropsWithChildren<{ +}: { testID?: string modui: ModerationUI | undefined ignoreMute?: boolean style?: StyleProp + activeStyle?: StyleProp childContainerStyle?: StyleProp -}>) { + children?: React.ReactNode | ((props: {active: boolean}) => React.ReactNode) +}) { const blur = modui?.blurs[0] if (!blur || (ignoreMute && isJustAMute(modui))) { return ( - {children} + {typeof children === 'function' ? children({active: false}) : children} ) } @@ -44,9 +47,9 @@ export function ContentHider({ - {children} + {typeof children === 'function' ? children({active: true}) : children} ) }