diff --git a/src/components/RequestEditor/RequestEditor.tsx b/src/components/RequestEditor/RequestEditor.tsx index 0a5b439..8833b66 100644 --- a/src/components/RequestEditor/RequestEditor.tsx +++ b/src/components/RequestEditor/RequestEditor.tsx @@ -14,7 +14,7 @@ const RequestEditor: FC> = ({ children, ...props }) {...props} data-testid="editor-request" className={cn( - 'animation-delay-200 relative flex h-full w-full origin-top animate-fade-in-screen gap-4 overflow-y-hidden rounded-4xl bg-surface-container pl-6 transition-all duration-500 ease-emphasized-decelerate', + 'animation-delay-200 transition-enter-screen relative flex h-full w-full origin-top animate-fade-in-screen gap-4 overflow-y-hidden rounded-4xl bg-surface-container pl-6', )} > diff --git a/src/pages/MainPage/MainPage.tsx b/src/pages/MainPage/MainPage.tsx index 873390f..343f014 100644 --- a/src/pages/MainPage/MainPage.tsx +++ b/src/pages/MainPage/MainPage.tsx @@ -85,7 +85,7 @@ const MainPage = () => { > -
+
{ transform: `scale3d(${interpolateResponse}, ${interpolateResponse}, 1)`, opacity: oneZeroResponse, }} - className={cn( - 'animation-delay-600 relative h-full w-full origin-bottom-right animate-fade-in-screen transition-all duration-500 ease-emphasized-decelerate', - { - 'transition-none': isResized.current, - }, - )} + className={cn('animation-delay-600 relative h-full w-full origin-bottom-right animate-fade-in-screen', { + 'transition-enter-screen': !isResponseHidden, + 'transition-exit-screen': isResponseHidden, + 'transition-none': isResized.current, + })} >
diff --git a/src/pages/MainPage/ui/RequestEditorResized.tsx b/src/pages/MainPage/ui/RequestEditorResized.tsx index feee2cf..34e42c7 100644 --- a/src/pages/MainPage/ui/RequestEditorResized.tsx +++ b/src/pages/MainPage/ui/RequestEditorResized.tsx @@ -82,12 +82,11 @@ const RequestEditorResized: FC> = ({ className, c style={{ height: `${height}px`, }} - className={cn( - 'animation-delay-400 relative h-full w-full origin-bottom-left animate-fade-in-screen transition-all duration-500 ease-emphasized-decelerate', - { - 'transition-none': isResized.current, - }, - )} + className={cn('animation-delay-400 relative h-full w-full origin-bottom-left animate-fade-in-screen', { + 'transition-enter-screen': !isCollapsed, + 'transition-exit-screen': isCollapsed, + 'transition-none': isResized.current, + })} > diff --git a/src/styles/index.css b/src/styles/index.css index dd0c007..e2a15fe 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -61,6 +61,16 @@ } } +@layer components { + .transition-enter-screen { + @apply transition-all duration-500 ease-emphasized-decelerate; + } + + .transition-exit-screen { + @apply transition-all duration-400 ease-emphasized-decelerate; + } +} + .os-scrollbar-handle { background-color: var(--md-sys-color-primary) !important; cursor: grab;