Skip to content

Commit

Permalink
properly animate the profile hover card (#3590)
Browse files Browse the repository at this point in the history
* properly implement with `isOpen` and `isPositioned`

* well, this works just as well

* add `willChange`
  • Loading branch information
haileyok authored Apr 17, 2024
1 parent 480fa10 commit d598289
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/ProfileHoverCard/index.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,12 @@ export function ProfileHoverCardInner(props: ProfileHoverCardProps) {
{props.children}
{isVisible && (
<Portal>
<div style={animationStyle}>
<div
ref={refs.setFloating}
style={floatingStyles}
onPointerEnter={onPointerEnterCard}
onPointerLeave={onPointerLeaveCard}>
<div
ref={refs.setFloating}
style={floatingStyles}
onPointerEnter={onPointerEnterCard}
onPointerLeave={onPointerLeaveCard}>
<div style={{willChange: 'transform', ...animationStyle}}>
<Card did={props.did} hide={onPress} />
</div>
</div>
Expand Down

0 comments on commit d598289

Please sign in to comment.