Skip to content

Commit

Permalink
Merge pull request #162 from boostcampwm-2024/bug-fe-#161
Browse files Browse the repository at this point in the history
사이드바에 ScrollWrapper 적용
  • Loading branch information
yewonJin authored Nov 14, 2024
2 parents 5de1374 + 18665af commit 31cd16c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import HoverTrigger from "./components/HoverTrigger";
import EditorView from "./components/EditorView";
import SideWrapper from "./components/layout/SideWrapper";
import Canvas from "./components/canvas";
import ScrollWrapper from "./components/layout/ScrollWrapper";

const queryClient = new QueryClient();

Expand All @@ -17,7 +18,9 @@ function App() {
</SideWrapper>
<Canvas className="z-0 h-full w-full" />
<HoverTrigger className="absolute inset-0 z-20 w-64">
<Sidebar />
<ScrollWrapper height={"h-[720px]"} className="overflow-x-clip">
<Sidebar />
</ScrollWrapper>
</HoverTrigger>
</div>
</QueryClientProvider>
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/components/layout/ScrollWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ type ScrollWrapperProps = {
width?: Tailwindest["width"];
height?: Tailwindest["height"];
children: React.ReactNode;
className?: string;
};

export default function ScrollWrapper({
width,
height,
children,
className,
}: ScrollWrapperProps) {
return <div className={cn("overflow-auto", width, height)}>{children}</div>;
return (
<div className={cn("overflow-auto", width, height, className)}>
{children}
</div>
);
}

0 comments on commit 31cd16c

Please sign in to comment.