Skip to content

Commit

Permalink
fix(animation): preserve exit transition for smoother animations (#2237)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangzy1 authored Dec 19, 2024
1 parent 4947082 commit aab23d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/renderer/src/components/common/Motion.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { MotionProps } from "framer-motion"
import type { MotionProps, TargetAndTransition } from "framer-motion"
import { m as M } from "framer-motion"
import { createElement, forwardRef } from "react"

Expand All @@ -19,6 +19,7 @@ export const m: typeof M = new Proxy(M, {
if (props.exit) {
nextProps.exit = {
opacity: 0,
transition: (props.exit as TargetAndTransition).transition,
}
}

Expand Down

0 comments on commit aab23d3

Please sign in to comment.