feat: 관리자 레이아웃 셸 공용 컴포넌트 추가
Co-Authored-By: Claude Opus 5
@f450ad141271f2fb0b94c931edbc592e6bffcdb6
+++ components/ui/header.tsx
... | ... | @@ -0,0 +1,34 @@ |
| 1 | +import Image from "next/image"; | |
| 2 | +import type { ReactNode } from "react"; | |
| 3 | + | |
| 4 | +interface HeaderProps { | |
| 5 | + title?: string; | |
| 6 | + leading?: ReactNode; | |
| 7 | + /** 우측 슬롯 */ | |
| 8 | + children?: ReactNode; | |
| 9 | + /** 배치(레이아웃) 조정용 클래스 패스스루만 허용 — 디자인 값(색상·타이포·간격 등) 주입 금지. */ | |
| 10 | + className?: string; | |
| 11 | +} | |
| 12 | + | |
| 13 | +/** 상단 헤더 셸 — 로고 + 타이틀 + 우측 슬롯. */ | |
| 14 | +export function Header({ title, leading, children, className }: HeaderProps) { | |
| 15 | + return ( | |
| 16 | + <header | |
| 17 | + className={`flex items-center justify-between gap-4 border-b border-border bg-surface px-6 py-4 ${className ?? ""}`} | |
| 18 | + > | |
| 19 | + <div className="flex items-center gap-3"> | |
| 20 | + {leading} | |
| 21 | + <Image | |
| 22 | + src="/images/logo-foxpay.svg" | |
| 23 | + alt="FoxPay" | |
| 24 | + width={170} | |
| 25 | + height={62} | |
| 26 | + className="h-8 w-auto" | |
| 27 | + priority | |
| 28 | + /> | |
| 29 | + {title && <span className="text-title-md text-foreground">{title}</span>} | |
| 30 | + </div> | |
| 31 | + {children && <div className="flex items-center gap-3">{children}</div>} | |
| 32 | + </header> | |
| 33 | + ); | |
| 34 | +} |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?