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

View File

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