import { forwardRef, type HTMLAttributes, type ReactNode } from 'react' import { cn } from '@/lib/utils' export interface DetailPageProps extends HTMLAttributes { /** PageHeader or custom header section */ header?: ReactNode /** Action bar below the header (e.g. tabs, buttons) */ actions?: ReactNode /** Single-column content area (max-w constrained for readability) */ children: ReactNode /** Max width of the content area */ maxWidth?: 'md' | 'lg' | 'xl' | 'full' } const maxWidthStyles = { md: 'max-w-2xl', lg: 'max-w-3xl', xl: 'max-w-5xl', full: '', } export const DetailPage = forwardRef( ({ header, actions, maxWidth = 'xl', className, children, ...props }, ref) => { return (
{header} {actions && (
{actions}
)}
{children}
) }, ) DetailPage.displayName = 'DetailPage'