Skip to content

Commit

Permalink
fix: link popover transition
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Jan 4, 2025
1 parent 80b4460 commit 77cb460
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/ui/float-popover/FloatPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ const RealFloatPopover = function FloatPopover<T extends {}>(
offset(offsetValue ?? 10),
shift(),
],

strategy: floatingProps.strategy,
placement: floatingProps.placement ?? 'bottom-start',
whileElementsMounted: floatingProps.whileElementsMounted,
Expand Down Expand Up @@ -288,7 +289,11 @@ const RealFloatPopover = function FloatPopover<T extends {}>(
ref={refs.setFloating}
initial={{ translateY: '10px', opacity: 0 }}
animate={{ translateY: '0px', opacity: 1 }}
exit={{ translateY: '10px', opacity: 0 }}
exit={{
translateY: '10px',
opacity: 0,
transition: { type: 'tween', duration: 0.2 },
}}
transition={microReboundPreset}
style={{
position: strategy,
Expand Down
1 change: 1 addition & 0 deletions src/components/ui/link/MLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export const MLink: FC<{
as="span"
wrapperClassName="!inline"
type="tooltip"
offset={0}
triggerElement={el}
>
<a href={href} target="_blank" rel="noreferrer">
Expand Down

0 comments on commit 77cb460

Please sign in to comment.