fix: modal exiting transition type

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei 2024-12-10 19:17:22 +08:00
parent 2d31b646fd
commit 5bb01006ad
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
1 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,4 @@
import type { Target } from "framer-motion"
import type { MotionProps, Target } from "framer-motion"
import { microReboundPreset } from "../../constants/spring"
@ -14,9 +14,15 @@ const initialStyle: Target = {
export const modalMontionConfig = {
initial: initialStyle,
animate: enterStyle,
exit: initialStyle,
exit: {
...initialStyle,
// no spring
transition: {
type: "tween",
},
},
transition: microReboundPreset,
}
} satisfies MotionProps
// Radix context menu z-index 999
export const MODAL_STACK_Z_INDEX = 1001