Some checks failed
Build & Publish / publish (push) Failing after 50s
DetailPanel now uses createPortal to render itself into #cameleer-detail-panel-root, a div that AppShell places as a direct sibling of .main in the top-level flex row. This means pages can render <DetailPanel> anywhere in their JSX and it automatically appears at the correct layout position. AppShell's detail prop is deprecated and ignored — the portal handles positioning automatically. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
22 lines
521 B
TypeScript
22 lines
521 B
TypeScript
import styles from './AppShell.module.css'
|
|
import type { ReactNode } from 'react'
|
|
|
|
interface AppShellProps {
|
|
sidebar: ReactNode
|
|
children: ReactNode
|
|
/** @deprecated DetailPanel now portals itself automatically. This prop is ignored. */
|
|
detail?: ReactNode
|
|
}
|
|
|
|
export function AppShell({ sidebar, children }: AppShellProps) {
|
|
return (
|
|
<div className={styles.app}>
|
|
{sidebar}
|
|
<div className={styles.main}>
|
|
{children}
|
|
</div>
|
|
<div id="cameleer-detail-panel-root" />
|
|
</div>
|
|
)
|
|
}
|