Skip to content

Commit dd03c7d

Browse files
committed
feat(#43): MenuList 컴포넌트 생성 및 메뉴 리스트 상수화
1 parent 8223571 commit dd03c7d

File tree

4 files changed

+55
-0
lines changed

4 files changed

+55
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { style } from "@vanilla-extract/css";
2+
3+
import { semantic, typography } from "@/styles";
4+
5+
export const wrapper = style({
6+
padding: "1.6rem 0",
7+
});
8+
9+
export const list = style({
10+
padding: "1.4rem 0",
11+
});
12+
13+
export const menuItem = style({
14+
...typography.body1Sb,
15+
color: semantic.text.normal,
16+
});
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
"use client";
2+
3+
import Link from "next/link";
4+
5+
import { VStack } from "@/components/ui/Stack";
6+
7+
import { MENU_LIST } from "../../_constants/menuList.constants";
8+
import * as styles from "./MenuList.css";
9+
10+
export const MenuList = () => {
11+
return (
12+
<>
13+
<VStack as='ul' gap={8} className={styles.wrapper}>
14+
{MENU_LIST.map(menu => (
15+
<li key={menu.id} className={styles.list}>
16+
{menu.isLogout ? (
17+
<button type='button' className={styles.menuItem}>
18+
{menu.label}
19+
</button>
20+
) : (
21+
<Link href={menu.link!} className={styles.menuItem}>
22+
{menu.label}
23+
</Link>
24+
)}
25+
</li>
26+
))}
27+
</VStack>
28+
{/* TODO: 로그아웃시 나타날 모달 연결 */}
29+
</>
30+
);
31+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { MenuList } from "./MenuList";
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// TODO: 노션, 인스타 링크 전달받으면 수정
2+
export const MENU_LIST = [
3+
{ id: "notice", label: "공지사항", link: "/" },
4+
{ id: "customer_service", label: "고객센터", link: "/" },
5+
{ id: "guide", label: "잇다 이용가이드", link: "/" },
6+
{ id: "logout", label: "로그아웃", isLogout: true },
7+
];

0 commit comments

Comments
 (0)