Files
frontend/apps/sn/app/components/ui/contentLayout.tsx
T

33 lines
959 B
TypeScript

/**
* 📄 Content Layout Component
* 콘텐츠 레이아웃 컴포넌트
*
* - 제목 표시 및 콘텐츠 영역 제공
* - 로딩 오버레이를 통한 사용자 피드백
* - 공통 레이아웃 구조 적용 (MainDiv, Title, ContentsDiv)
* - 조건부 로딩 상태 렌더링
* - 클래스명 기반 스타일링 지원
* - 재사용 가능한 레이아웃 컴포넌트
*/
import { ContentsDiv, MainDiv, Title } from '@common/business_components/ui'
import React, { type ReactNode } from 'react'
import LoadingOverlay from './LoadingBar'
type LayoutNode = {
children : ReactNode
title : string
isLoading?: boolean
className?: string
}
const ContentLayout = ({children, title, isLoading, className} : LayoutNode) => {
return (
<MainDiv>
<Title title={title} />
<ContentsDiv>
<LoadingOverlay isLoading={isLoading ?? false}/>
{children}
</ContentsDiv>
</MainDiv>
)
}
export default ContentLayout