File tree Expand file tree Collapse file tree 7 files changed +134
-7
lines changed
Expand file tree Collapse file tree 7 files changed +134
-7
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,11 @@ import CameraIcon from "@/assets/svg/ic-camera.svg?react";
22import CloseIcon from "@/assets/svg/ic-close.svg?react" ;
33import GalleryIcon from "@/assets/svg/ic-gallery.svg?react" ;
44import LeftArrowIcon from "@/assets/svg/ic-left-arrow.svg?react" ;
5+ import LogoIcon from "@/assets/svg/ic-logo.svg?react" ;
56import PasteIcon from "@/assets/svg/ic-paste.svg?react" ;
67import PlusIcon from "@/assets/svg/ic-plus.svg?react" ;
78
8- export type IconNameType = "camera" | "close" | "gallery" | "leftArrow" | "paste" | "plus" ;
9+ export type IconNameType = "camera" | "close" | "gallery" | "leftArrow" | "paste" | "plus" | "logo" ;
910
1011export interface IconProps {
1112 name : IconNameType ;
@@ -18,6 +19,7 @@ export const ICONS = {
1819 leftArrow : LeftArrowIcon ,
1920 paste : PasteIcon ,
2021 plus : PlusIcon ,
22+ logo : LogoIcon ,
2123} ;
2224
2325// 추후 사이즈, 컬러등 추가 가능
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