Skip to content

Commit 84e132d

Browse files
committed
refactor: navbar 수정, 미사용 파일 삭제
1 parent 9cc1bff commit 84e132d

File tree

17 files changed

+97
-300
lines changed

17 files changed

+97
-300
lines changed

src/components/ui/NavbarV2/NavbarV2.module.scss renamed to src/components/common/Navbar/Navbar.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.NavbarV2 {
1+
.Navbar {
22
display: flex;
33
align-items: center;
44
justify-content: space-between;
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import { MemoryRouter } from "react-router-dom";
2+
3+
import Navbar from "@/components/common/Navbar/Navbar";
4+
import Icon from "@/components/ui/Icon/Icon";
5+
import Text from "@/components/ui/Text/Text";
6+
7+
import type { Meta, StoryObj } from "@storybook/react";
8+
9+
const meta: Meta = {
10+
title: "Components/Navbar",
11+
decorators: [
12+
(Story) => (
13+
<MemoryRouter>
14+
<div style={{ width: 350, border: "1px solid #ccc" }}>
15+
<Story />
16+
</div>
17+
</MemoryRouter>
18+
),
19+
],
20+
};
21+
22+
export default meta;
23+
24+
type Story = StoryObj;
25+
26+
export const HomeNavbar: Story = {
27+
name: "HomeNavbar",
28+
render: () => (
29+
<Navbar>
30+
<Navbar.LeftButton>
31+
<Icon name="logo" />
32+
</Navbar.LeftButton>
33+
<Navbar.RightButton>
34+
<Text variant="bodySm" color="secondary">
35+
앱 공유하기
36+
</Text>
37+
</Navbar.RightButton>
38+
</Navbar>
39+
),
40+
};
41+
42+
export const ArrowNavbar: Story = {
43+
name: "ArrowNavbar",
44+
render: () => (
45+
<Navbar>
46+
<Navbar.LeftButton>
47+
<Icon name="leftArrow" />
48+
</Navbar.LeftButton>
49+
</Navbar>
50+
),
51+
};
52+
53+
export const CloseNavbar: Story = {
54+
name: "CloseNavbar",
55+
render: () => (
56+
<Navbar>
57+
<Navbar.RightButton>
58+
<Icon name="close" />
59+
</Navbar.RightButton>
60+
</Navbar>
61+
),
62+
};
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ import type { ButtonHTMLAttributes, PropsWithChildren } from "react";
22

33
import classNames from "classnames";
44

5-
import styles from "@/components/ui/NavbarV2/NavbarV2.module.scss";
5+
import styles from "@/components/common/Navbar/Navbar.module.scss";
66

7-
const NavbarV2 = ({ children }: PropsWithChildren) => {
8-
return <div className={styles.NavbarV2}>{children}</div>;
7+
const Navbar = ({ children }: PropsWithChildren) => {
8+
return <div className={styles.Navbar}>{children}</div>;
99
};
1010

11-
NavbarV2.LeftButton = ({
11+
Navbar.LeftButton = ({
1212
children,
13-
// 확장성 고려해서 className 추가 현재 디자인상에서는 사실 필요 없기는 함
1413
className,
1514
...props
1615
}: ButtonHTMLAttributes<HTMLButtonElement>) => {
@@ -21,7 +20,7 @@ NavbarV2.LeftButton = ({
2120
);
2221
};
2322

24-
NavbarV2.RightButton = ({
23+
Navbar.RightButton = ({
2524
children,
2625
className,
2726
...props
@@ -33,4 +32,4 @@ NavbarV2.RightButton = ({
3332
);
3433
};
3534

36-
export default NavbarV2;
35+
export default Navbar;

src/components/ui/ArrowNavbar/ArrowNavbar.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/components/ui/CloseNavbar/CloseNavbar.tsx

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/components/ui/HomeNavbar/HomeNavbar.tsx

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/components/ui/Navbar/BaseNavartypes.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/components/ui/Navbar/NavButton.tsx

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/components/ui/Navbar/Navbar.module.css

Lines changed: 0 additions & 44 deletions
This file was deleted.

src/components/ui/Navbar/Navbar.module.scss

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)