diff options
author | Hailey <me@haileyok.com> | 2024-04-16 18:51:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-17 02:51:25 +0100 |
commit | d5982891fa0f79a5bc00eccb66be2611fb2d3502 (patch) | |
tree | f17bca4a139fa9838ebbe69d45adba03d96138ae /src | |
parent | 480fa10e0b90ba907db04123f0791f8ba756ab65 (diff) | |
download | voidsky-d5982891fa0f79a5bc00eccb66be2611fb2d3502.tar.zst |
properly animate the profile hover card (#3590)
* properly implement with `isOpen` and `isPositioned` * well, this works just as well * add `willChange`
Diffstat (limited to 'src')
-rw-r--r-- | src/components/ProfileHoverCard/index.web.tsx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/ProfileHoverCard/index.web.tsx b/src/components/ProfileHoverCard/index.web.tsx index 467cbddc6..2cd1228d8 100644 --- a/src/components/ProfileHoverCard/index.web.tsx +++ b/src/components/ProfileHoverCard/index.web.tsx @@ -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> |