Skip to content

Commit

Permalink
feat/#49/sidebar position:sticky로 위치 고정
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmj12 committed Jan 14, 2025
1 parent 02be98e commit 3464e0f
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 7 deletions.
30 changes: 30 additions & 0 deletions src/components/Mypage/MyProjects.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
export default function MyProjectComponents() {
return (
<div
style={{ width: "300px", height: "1000px", border: "solid 30x black" }}
>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
<h1>hello</h1>
</div>
);
}
14 changes: 8 additions & 6 deletions src/components/Mypage/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ export const MypageContainer = styled.div`

export const MypageSidebarContainer = styled.div`
width: 200px;
display: flex;
flex-direction: column;
height: 100%;
position: sticky;
top: 140px;
`;

export const MypageMyinfo = styled.div`
Expand All @@ -42,7 +43,6 @@ export const MypageSidebar = styled.div`
margin-top: 17px;
display: flex;
flex-direction: column;
align-items: baseline;
button {
display: flex;
Expand All @@ -64,7 +64,9 @@ export const MypageSidebar = styled.div`
`;

export const MypageContentContainer = styled.div`
/* border: solid black 3px; */
margin: auto;
display: flex;
flex: 1;
overflow-y: auto;
border: solid black 3px;
min-width: 400px;
height: 2000px;
`;
3 changes: 2 additions & 1 deletion src/pages/mypage/myprojects.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React from "react";
import MypageLayout from "@/components/Mypage/MypageLayout";
import MyProjectComponents from "@/components/Mypage/MyProjects";

const MyProjects: React.FC = () => {
return (
<MypageLayout>
<p>나의 프로젝트 ^^</p>
<MyProjectComponents />
</MypageLayout>
);
};
Expand Down

0 comments on commit 3464e0f

Please sign in to comment.