File tree Expand file tree Collapse file tree 3 files changed +54
-0
lines changed
Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ import { style } from "@vanilla-extract/css" ;
2+
3+ import { semantic } from "@/styles" ;
4+
5+ export const button = style ( {
6+ width : "2.4rem" ,
7+ height : "2.4rem" ,
8+ display : "flex" ,
9+ justifyContent : "center" ,
10+ alignItems : "center" ,
11+ } ) ;
12+
13+ export const icon = style ( {
14+ color : semantic . icon . black ,
15+ } ) ;
Original file line number Diff line number Diff line change 1+ "use client" ;
2+
3+ import { useRouter } from "next/navigation" ;
4+
5+ import ChevronLeftIcon from "@/assets/chevron-left.svg" ;
6+ import { GNB } from "@/components/ui/GNB" ;
7+
8+ import * as styles from "./Header.css" ;
9+
10+ export const Header = ( ) => {
11+ const router = useRouter ( ) ;
12+
13+ const handleClick = ( ) => {
14+ router . push ( "/" ) ;
15+ } ;
16+
17+ return (
18+ < GNB
19+ align = 'center'
20+ title = '마이페이지'
21+ leftAddon = {
22+ < button
23+ type = 'button'
24+ onClick = { handleClick }
25+ aria-label = '홈으로 이동하기'
26+ className = { styles . button }
27+ >
28+ < ChevronLeftIcon
29+ width = { 24 }
30+ height = { 24 }
31+ onClick = { handleClick }
32+ className = { styles . icon }
33+ />
34+ </ button >
35+ }
36+ />
37+ ) ;
38+ } ;
Original file line number Diff line number Diff line change 1+ export { Header } from "./Header" ;
You can’t perform that action at this time.
0 commit comments