diff --git a/app/cdap/components/layouts/SectionWithPanel.tsx b/app/cdap/components/layouts/SectionWithPanel.tsx index e9c583d95fc..6054135559f 100644 --- a/app/cdap/components/layouts/SectionWithPanel.tsx +++ b/app/cdap/components/layouts/SectionWithPanel.tsx @@ -320,7 +320,7 @@ export default function SectionWithPanel({ } async function resizePanelTo( - opensFrom: PanelOpeningDirection, + panelOpensFrom: PanelOpeningDirection, newSize: number, durationInMs: number = 0 ): Promise { @@ -331,15 +331,15 @@ export default function SectionWithPanel({ const oldPanelWrapperTransition = panelWrapperRef.current.style.transition; const oldDividerTransition = dividerRef.current.style.transition; - const transitioningDimension = isHorizontal(opensFrom) ? 'width' : 'height'; + const transitioningDimension = isHorizontal(panelOpensFrom) ? 'width' : 'height'; if (durationInMs) { panelWrapperRef.current.style.transition = `${transitioningDimension} ${durationInMs / 1000}s linear`; - dividerRef.current.style.transition = `${opensFrom} ${durationInMs / 1000}s linear`; + dividerRef.current.style.transition = `${panelOpensFrom} ${durationInMs / 1000}s linear`; } panelWrapperRef.current.style[transitioningDimension] = `${newSize}px`; - dividerRef.current.style[opensFrom] = `${newSize - DIVIDER_SIZE}px`; + dividerRef.current.style[panelOpensFrom] = `${newSize - DIVIDER_SIZE}px`; if (durationInMs) { await sleep(durationInMs);