properly animate the profile hover card (#3590)

* properly implement with `isOpen` and `isPositioned`

* well, this works just as well

* add `willChange`
zio/stable
Hailey 2024-04-16 18:51:25 -07:00 committed by GitHub
parent 480fa10e0b
commit d5982891fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 6 deletions

View File

@ -289,12 +289,12 @@ export function ProfileHoverCardInner(props: ProfileHoverCardProps) {
{props.children} {props.children}
{isVisible && ( {isVisible && (
<Portal> <Portal>
<div style={animationStyle}> <div
<div ref={refs.setFloating}
ref={refs.setFloating} style={floatingStyles}
style={floatingStyles} onPointerEnter={onPointerEnterCard}
onPointerEnter={onPointerEnterCard} onPointerLeave={onPointerLeaveCard}>
onPointerLeave={onPointerLeaveCard}> <div style={{willChange: 'transform', ...animationStyle}}>
<Card did={props.did} hide={onPress} /> <Card did={props.did} hide={onPress} />
</div> </div>
</div> </div>