File tree Expand file tree Collapse file tree 7 files changed +135
-7
lines changed
Expand file tree Collapse file tree 7 files changed +135
-7
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import CloseIcon from "@/assets/svg/ic-close.svg?react";
44import EmptyCircleIcon from "@/assets/svg/ic-empty-circle.svg?react" ;
55import GalleryIcon from "@/assets/svg/ic-gallery.svg?react" ;
66import LeftArrowIcon from "@/assets/svg/ic-left-arrow.svg?react" ;
7+ import LogoIcon from "@/assets/svg/ic-logo.svg?react" ;
78import PasteIcon from "@/assets/svg/ic-paste.svg?react" ;
89import PlusIcon from "@/assets/svg/ic-plus.svg?react" ;
910
@@ -15,7 +16,8 @@ export type IconNameType =
1516 | "paste"
1617 | "plus"
1718 | "checkCircle"
18- | "emptyCircle" ;
19+ | "emptyCircle"
20+ | "logo" ;
1921
2022export interface IconProps {
2123 name : IconNameType ;
@@ -30,6 +32,7 @@ export const ICONS = {
3032 plus : PlusIcon ,
3133 checkCircle : CheckCircleIcon ,
3234 emptyCircle : EmptyCircleIcon ,
35+ logo : LogoIcon ,
3336} ;
3437
3538// 추후 사이즈, 컬러등 추가 가능
Original file line number Diff line number Diff line change 1+ .NavbarV2 {
2+ display : flex ;
3+ align-items : center ;
4+ justify-content : space-between ;
5+ width : 100% ;
6+ height : 2.75rem ;
7+ padding : 0.75rem 1.25rem ;
8+ background-color : var (--color-white );
9+
10+ button {
11+ display : flex ;
12+ }
13+ }
14+
15+ .RightButton {
16+ margin-left : auto ;
17+ }
Original file line number Diff line number Diff line change 1+ import type { ButtonHTMLAttributes , PropsWithChildren } from "react" ;
2+
3+ import classNames from "classnames" ;
4+
5+ import styles from "@/components/ui/NavbarV2/NavbarV2.module.scss" ;
6+
7+ const NavbarV2 = ( { children } : PropsWithChildren ) => {
8+ return < div className = { styles . NavbarV2 } > { children } </ div > ;
9+ } ;
10+
11+ NavbarV2 . LeftButton = ( {
12+ children,
13+ // 확장성 고려해서 className 추가 현재 디자인상에서는 사실 필요 없기는 함
14+ className,
15+ ...props
16+ } : ButtonHTMLAttributes < HTMLButtonElement > ) => {
17+ return (
18+ < button { ...props } className = { className } >
19+ { children }
20+ </ button >
21+ ) ;
22+ } ;
23+
24+ NavbarV2 . RightButton = ( {
25+ children,
26+ className,
27+ ...props
28+ } : ButtonHTMLAttributes < HTMLButtonElement > ) => {
29+ return (
30+ < button className = { classNames ( styles . RightButton , className ) } { ...props } >
31+ { children }
32+ </ button >
33+ ) ;
34+ } ;
35+
36+ export default NavbarV2 ;
Original file line number Diff line number Diff line change 1+ import { useNavigate } from "react-router-dom" ;
2+
13import Home from "@/components/Home/Home" ;
2- import HomeNavbar from "@/components/ui/HomeNavbar/HomeNavbar" ;
4+ import Icon from "@/components/ui/Icon/Icon" ;
5+ import NavbarV2 from "@/components/ui/NavbarV2/NavbarV2" ;
6+ import Text from "@/components/ui/Text/Text" ;
37
48const HomePage = ( ) => {
9+ const navigate = useNavigate ( ) ;
10+
11+ const handleLogoClick = ( ) => {
12+ navigate ( "/" ) ;
13+ } ;
514 return (
615 < >
7- < HomeNavbar />
16+ < NavbarV2 >
17+ < NavbarV2 . LeftButton onClick = { handleLogoClick } >
18+ < Icon name = "logo" />
19+ </ NavbarV2 . LeftButton >
20+ < NavbarV2 . RightButton >
21+ < Text variant = "bodySm" color = "secondary" >
22+ 앱 공유하기
23+ </ Text >
24+ </ NavbarV2 . RightButton >
25+ </ NavbarV2 >
26+
827 < Home />
928 </ >
1029 ) ;
Original file line number Diff line number Diff line change 11import ReceiptEdit from "@/components/ReceiptEdit/ReceiptEdit" ;
2- import ArrowNavbar from "@/components/ui/ArrowNavbar/ArrowNavbar" ;
2+ import Icon from "@/components/ui/Icon/Icon" ;
3+ import NavbarV2 from "@/components/ui/NavbarV2/NavbarV2" ;
34
45const ReceiptEditPage = ( ) => {
56 return (
67 < >
7- < ArrowNavbar />
8+ < NavbarV2 >
9+ < NavbarV2 . LeftButton >
10+ < Icon name = "leftArrow" />
11+ </ NavbarV2 . LeftButton >
12+ </ NavbarV2 >
13+
814 < ReceiptEdit />
915 </ >
1016 ) ;
Original file line number Diff line number Diff line change 11import RecognitionFail from "@/components/RecognitionFail/RecognitionFail" ;
2- import CloseNavbar from "@/components/ui/CloseNavbar/CloseNavbar" ;
2+ import Icon from "@/components/ui/Icon/Icon" ;
3+ import NavbarV2 from "@/components/ui/NavbarV2/NavbarV2" ;
34
45const RecognitionFailPage = ( ) => {
56 return (
67 < >
7- < CloseNavbar />
8+ < NavbarV2 >
9+ < NavbarV2 . RightButton >
10+ < Icon name = "close" />
11+ </ NavbarV2 . RightButton >
12+ </ NavbarV2 >
13+
814 < RecognitionFail />
915 </ >
1016 ) ;
You can’t perform that action at this time.
0 commit comments