Files
contact-front/src/components/external/ExternalLayout.tsx

61 lines
1.7 KiB
TypeScript

import React from "react";
import Image from "next/image";
interface ExternalLayoutProps {
children: React.ReactNode;
/** 헤더 우측 영역 (선택) */
headerRight?: React.ReactNode;
/** 푸터 우측 텍스트 (선택, 기본: "KRi Survey Platform") */
footerRight?: string;
}
const ExternalLayout = (
{
children,
headerRight,
footerRight = "KRi Contact System",
}: ExternalLayoutProps
) => {
return (
<div className="flex min-h-svh flex-col bg-background antialiased">
{/* 상단 컬러 바 */}
<div className="h-1 w-full flex-shrink-0 bg-primary" />
{/* 헤더 */}
<header className="flex flex-shrink-0 items-center justify-between border-b px-12 py-2">
<Image
src="/kri_logo.png"
alt="KRi"
width={80}
height={32}
className="h-8 w-auto object-contain"
priority
/>
{headerRight ?? (
<span className="text-xs font-semibold uppercase tracking-widest text-muted-foreground">
KRi Contact System
</span>
)}
</header>
{/* 콘텐츠 */}
<div className="flex flex-1 flex-col">
{children}
</div>
{/* 푸터 */}
<footer className="flex flex-shrink-0 items-center justify-between border-t px-12 py-5">
<span className="text-xs text-muted-foreground">
© {new Date().getFullYear()} KRi. All rights reserved.
</span>
<span className="text-xs text-muted-foreground">
{footerRight}
</span>
</footer>
</div>
);
}
export default ExternalLayout