Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

사이드바에 ScrollWrapper 적용 #162

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
);
}
Loading