From 5bb01006ad04f8e5ed93076905b78b74ce293f79 Mon Sep 17 00:00:00 2001 From: Innei Date: Tue, 10 Dec 2024 19:17:22 +0800 Subject: [PATCH] fix: modal exiting transition type Signed-off-by: Innei --- .../src/components/ui/modal/stacked/constants.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/renderer/src/components/ui/modal/stacked/constants.ts b/apps/renderer/src/components/ui/modal/stacked/constants.ts index fe5613a5a..2d4c8ef4f 100644 --- a/apps/renderer/src/components/ui/modal/stacked/constants.ts +++ b/apps/renderer/src/components/ui/modal/stacked/constants.ts @@ -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