Skip to content

Commit

Permalink
[FEAT][FE] #134 : Layout ๊ตฌํ˜„
Browse files Browse the repository at this point in the history
  • Loading branch information
leedongyull committed Nov 11, 2024
1 parent 7a33efe commit 698e99f
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions frontend/src/component/Layout/Layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React, { ReactNode } from 'react';
import { Header } from './Header';
import { Footer } from './Footer';

interface ILayoutProps {
children: ReactNode;
headerTitle?: string;
footerTitle?: string;
isHeaderTransparent?: boolean;
footerActive?: boolean;
headerButton?: ReactNode;
footerOnClick?: () => void;
}

export const Layout: React.FC<ILayoutProps> = ({
children,
headerTitle = '์‚ฌ์šฉ์ž 1์— ๋Œ€ํ•œ ๊ฒฝ๋กœ ์„ค์ •',
footerTitle = '์ถœ๋ฐœ์ง€์  ์„ ํƒ',
isHeaderTransparent = false,
footerActive = true,
headerButton,
footerOnClick,
}) => (
<div className="flex flex-col items-center w-full h-full">
{/* Header */}
<Header title={headerTitle} isTransparency={isHeaderTransparent} buttonElement={headerButton} />

{/* Main content */}
<main>{children}</main>

{/* Footer */}
<Footer title={footerTitle} onClick={footerOnClick} active={footerActive} />
</div>
);

0 comments on commit 698e99f

Please sign in to comment.