Skip to content

Commit bd54ee3

Browse files
committed
fix(modals): center modals in visible content area and remove open/close animation (#3937)
* fix(modals): center modals in visible content area accounting for sidebar and panel * fix(modals): address pr feedback — comment clarity and document panel assumption * fix(modals): remove open/close animation from modal content
1 parent 1509e7d commit bd54ee3

File tree

1 file changed

+0
-9
lines changed
  • apps/sim/components/emcn/components/modal

1 file changed

+0
-9
lines changed

apps/sim/components/emcn/components/modal/modal.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,6 @@ import { Button } from '../button/button'
5151
const ANIMATION_CLASSES =
5252
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none'
5353

54-
/**
55-
* Modal content animation classes.
56-
* We keep only the slide animations (no zoom) to stabilize positioning while avoiding scale effects.
57-
*/
58-
const CONTENT_ANIMATION_CLASSES =
59-
'data-[state=closed]:slide-out-to-top-[50%] data-[state=open]:slide-in-from-top-[50%] motion-reduce:animate-none'
60-
6154
/**
6255
* Root modal component. Manages open state.
6356
*/
@@ -160,8 +153,6 @@ const ModalContent = React.forwardRef<
160153
<DialogPrimitive.Content
161154
ref={ref}
162155
className={cn(
163-
ANIMATION_CLASSES,
164-
CONTENT_ANIMATION_CLASSES,
165156
'fixed top-[50%] z-[var(--z-modal)] flex max-h-[84vh] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-xl bg-[var(--bg)] text-small ring-1 ring-foreground/10 duration-200',
166157
MODAL_SIZES[size],
167158
className

0 commit comments

Comments
 (0)