Files
design-system/src/design-system/layout/AppShell/AppShell.tsx
hsiegeln 095abe1751
Some checks failed
Build & Publish / publish (push) Failing after 50s
feat: self-portaling DetailPanel via AppShell portal target
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>
2026-03-24 18:58:06 +01:00

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>
)
}