Skip to content

Commit

Permalink
Merge pull request #6 from whatever-mentoring/feature/Mypage-components
Browse files Browse the repository at this point in the history
feat: ๋งˆ์ดํŽ˜์ด์ง€ ์„œ๋ธŒ๋ฉ”๋‰ด ํƒญ ์ปดํฌ๋„ŒํŠธ ์ƒ์„ฑ
  • Loading branch information
chaeyeonan authored Sep 16, 2023
2 parents c524ef0 + 54a7e95 commit 3cd8e23
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 9 deletions.
5 changes: 5 additions & 0 deletions public/img/MypageSubmenuIcons/logoutIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/img/MypageSubmenuIcons/myCommentIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions public/img/MypageSubmenuIcons/myQnaIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/img/MypageSubmenuIcons/myScrapIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/img/MypageSubmenuIcons/newsLetterIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/img/arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 16 additions & 8 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { CommentListBox } from 'components/Mypage/CommentListBox';
import { MyQnaListBox } from 'components/Mypage/MyQnaListBox';
import { ScrapListBox } from 'components/Mypage/ScrapListBox';
import { Waitingtab } from 'components/Mypage/WaitingTab';
import { SubMenuBox } from 'components/Mypage/SubMenuBox';
import React from 'react';

function App() {
Expand All @@ -14,10 +11,21 @@ function App() {
gap: 30,
}}
>
<Waitingtab />
<CommentListBox />
<ScrapListBox />
<MyQnaListBox />
<SubMenuBox count={5} icon="myQnaIcon">
๋‚ด ์งˆ๋ฌธ
</SubMenuBox>
<SubMenuBox count={5} icon="myCommentIcon">
๋‚ด ๋Œ“๊ธ€
</SubMenuBox>
<SubMenuBox count={5} icon="myScrapIcon">
์Šคํฌ๋žฉ
</SubMenuBox>
<SubMenuBox count={-1} icon="newsLetterIcon">
๋‰ด์Šค๋ ˆํ„ฐ ๊ตฌ๋…
</SubMenuBox>
<SubMenuBox count={-1} icon="logoutIcon">
๋กœ๊ทธ์•„์›ƒ
</SubMenuBox>
</div>
);
}
Expand Down
3 changes: 2 additions & 1 deletion src/assets/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ export const Column = styled.div<{
export const MyPageBoxContainer = styled.div<{
height?: string;
padding?: string;
borderRadius?: number;
}>`
display: flex;
width: 100%;
height: ${({ height }) => (height ? height : 'fit-content')};
border-radius: 5px;
border-radius: ${({ borderRadius }) => (borderRadius ? borderRadius : 5)}px;
padding: ${({ padding }) => (padding ? padding : 0)};
background: ${Palette.White};
box-shadow: 1px 1px 4px 0px rgba(0, 0, 0, 0.1);
Expand Down
40 changes: 40 additions & 0 deletions src/components/Mypage/SubMenuBox.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { MyPageBoxContainer, Row } from 'assets/common';
import { Palette } from 'styles/Palette';
import Typo from 'styles/Typo';

export const SubMenuBox = ({
children,
count,
icon,
}: {
children: React.ReactNode;
count?: number;
icon: string;
}) => {
return (
<MyPageBoxContainer borderRadius={10} height="75px" padding="25px 15px">
<Row
alignItems="center"
justifyContent="space-between"
style={{ width: '100%' }}
>
<Row gap={19}>
<img src={`/img/MypageSubmenuIcons/${icon}.svg`}></img>
<Typo.b1>{children}</Typo.b1>
</Row>
<Row gap={8}>
{count !== -1 ? (
<Row gap={3}>
<Typo.b2 color={Palette.Main}>{count}</Typo.b2>
<Typo.b2 color={Palette.Gray4}>๊ฐœ</Typo.b2>
</Row>
) : (
<></>
)}

<img src="/img/arrow.svg" />
</Row>
</Row>
</MyPageBoxContainer>
);
};

0 comments on commit 3cd8e23

Please sign in to comment.