fix quote padding not being pressable
This commit is contained in:
@@ -268,25 +268,19 @@ export function QuoteEmbed({
|
|||||||
const [hover, setHover] = React.useState(false)
|
const [hover, setHover] = React.useState(false)
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
onPointerEnter={() => {
|
style={[a.mt_sm]}
|
||||||
setHover(true)
|
onPointerEnter={() => setHover(true)}
|
||||||
}}
|
onPointerLeave={() => setHover(false)}>
|
||||||
onPointerLeave={() => {
|
|
||||||
setHover(false)
|
|
||||||
}}>
|
|
||||||
<ContentHider
|
<ContentHider
|
||||||
modui={moderation?.ui('contentList')}
|
modui={moderation?.ui('contentList')}
|
||||||
style={[
|
style={[a.rounded_md, a.border, t.atoms.border_contrast_low, style]}
|
||||||
a.rounded_md,
|
activeStyle={[a.p_md, a.pt_sm]}
|
||||||
a.p_md,
|
|
||||||
a.mt_sm,
|
|
||||||
a.border,
|
|
||||||
t.atoms.border_contrast_low,
|
|
||||||
style,
|
|
||||||
]}
|
|
||||||
childContainerStyle={[a.pt_sm]}>
|
childContainerStyle={[a.pt_sm]}>
|
||||||
<SubtleWebHover hover={hover} />
|
{({active}) => (
|
||||||
|
<>
|
||||||
|
{!active && <SubtleWebHover hover={hover} style={[a.rounded_md]} />}
|
||||||
<Link
|
<Link
|
||||||
|
style={[!active && a.p_md]}
|
||||||
hoverStyle={{borderColor: pal.colors.borderLinkHover}}
|
hoverStyle={{borderColor: pal.colors.borderLinkHover}}
|
||||||
href={itemHref}
|
href={itemHref}
|
||||||
title={itemTitle}
|
title={itemTitle}
|
||||||
@@ -326,6 +320,8 @@ export function QuoteEmbed({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</ContentHider>
|
</ContentHider>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -23,20 +23,23 @@ export function ContentHider({
|
|||||||
modui,
|
modui,
|
||||||
ignoreMute,
|
ignoreMute,
|
||||||
style,
|
style,
|
||||||
|
activeStyle,
|
||||||
childContainerStyle,
|
childContainerStyle,
|
||||||
children,
|
children,
|
||||||
}: React.PropsWithChildren<{
|
}: {
|
||||||
testID?: string
|
testID?: string
|
||||||
modui: ModerationUI | undefined
|
modui: ModerationUI | undefined
|
||||||
ignoreMute?: boolean
|
ignoreMute?: boolean
|
||||||
style?: StyleProp<ViewStyle>
|
style?: StyleProp<ViewStyle>
|
||||||
|
activeStyle?: StyleProp<ViewStyle>
|
||||||
childContainerStyle?: StyleProp<ViewStyle>
|
childContainerStyle?: StyleProp<ViewStyle>
|
||||||
}>) {
|
children?: React.ReactNode | ((props: {active: boolean}) => React.ReactNode)
|
||||||
|
}) {
|
||||||
const blur = modui?.blurs[0]
|
const blur = modui?.blurs[0]
|
||||||
if (!blur || (ignoreMute && isJustAMute(modui))) {
|
if (!blur || (ignoreMute && isJustAMute(modui))) {
|
||||||
return (
|
return (
|
||||||
<View testID={testID} style={style}>
|
<View testID={testID} style={style}>
|
||||||
{children}
|
{typeof children === 'function' ? children({active: false}) : children}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -44,9 +47,9 @@ export function ContentHider({
|
|||||||
<ContentHiderActive
|
<ContentHiderActive
|
||||||
testID={testID}
|
testID={testID}
|
||||||
modui={modui}
|
modui={modui}
|
||||||
style={style}
|
style={[style, activeStyle]}
|
||||||
childContainerStyle={childContainerStyle}>
|
childContainerStyle={childContainerStyle}>
|
||||||
{children}
|
{typeof children === 'function' ? children({active: true}) : children}
|
||||||
</ContentHiderActive>
|
</ContentHiderActive>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user