Fix overflowing text on web and iOS in `PostMeta` (#3982)

* `flexShrink` on iOS and web

`flexShrink` on iOS and web

`flexShrink` on iOS and web

actually, `flexShrink`

use `flex`

* adjust web

* `expect-error` `onMouseUp`

* ignore ref type check
zio/stable
Hailey 2024-05-13 08:49:54 -07:00 committed by GitHub
parent d49b93dc7e
commit e02cae2acd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -285,14 +285,14 @@ export function ProfileHoverCardInner(props: ProfileHoverCardProps) {
} }
return ( return (
<div <View
// @ts-ignore View is being used as div
ref={refs.setReference} ref={refs.setReference}
onPointerMove={onPointerMoveTarget} onPointerMove={onPointerMoveTarget}
onPointerLeave={onPointerLeaveTarget} onPointerLeave={onPointerLeaveTarget}
// @ts-ignore web only prop
onMouseUp={onPress} onMouseUp={onPress}
style={{ style={{flexShrink: 1}}>
display: props.inline ? 'inline' : 'block',
}}>
{props.children} {props.children}
{isVisible && ( {isVisible && (
<Portal> <Portal>
@ -307,7 +307,7 @@ export function ProfileHoverCardInner(props: ProfileHoverCardProps) {
</div> </div>
</Portal> </Portal>
)} )}
</div> </View>
) )
} }

View File

@ -142,6 +142,6 @@ const styles = StyleSheet.create({
}, },
maxWidth: { maxWidth: {
flex: isAndroid ? 1 : undefined, flex: isAndroid ? 1 : undefined,
maxWidth: !isAndroid ? '80%' : undefined, flexShrink: isAndroid ? undefined : 1,
}, },
}) })