Skip to content

Commit a969160

Browse files
authored
Fix Scrollbars Appearing when Context Panel is Collapsed (#1124)
1 parent 81e019d commit a969160

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/components/shared/ContextPanel/CollapsibleContextPanel.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
} from "@/components/ui/collapsible";
99
import { Icon } from "@/components/ui/icon";
1010
import { VerticalResizeHandle } from "@/components/ui/resize-handle";
11-
import { cn } from "@/lib/utils";
1211

1312
import { ContextPanel } from "./ContextPanel";
1413

@@ -31,17 +30,15 @@ export function CollapsibleContextPanel({
3130
<Button
3231
variant="ghost"
3332
size="icon"
34-
className={
35-
"absolute top-[95px] z-0 transition-all duration-300 bg-white rounded-r-md shadow-md p-0.5 pr-1 -translate-x-8"
36-
}
33+
className="absolute top-[95px] z-0 transition-all duration-300 bg-white rounded-r-none shadow-md -translate-x-9"
3734
aria-label={open ? "Collapse context panel" : "Expand context panel"}
3835
>
3936
<Icon name={open ? "PanelRightClose" : "PanelRightOpen"} />
4037
</Button>
4138
</CollapsibleTrigger>
4239
<div
43-
className={cn("relative h-full flex", !open && "!w-0")}
44-
style={{ width: `${DEFAULT_WIDTH}px` }}
40+
className="relative h-full flex"
41+
style={{ width: open ? `${DEFAULT_WIDTH}px` : "0px" }}
4542
>
4643
{open && (
4744
<VerticalResizeHandle

0 commit comments

Comments
 (0)