diff --git a/src/design-system/composites/DetailPanel/DetailPanel.module.css b/src/design-system/composites/DetailPanel/DetailPanel.module.css index 96480b1..ebc16cd 100644 --- a/src/design-system/composites/DetailPanel/DetailPanel.module.css +++ b/src/design-system/composites/DetailPanel/DetailPanel.module.css @@ -1,3 +1,16 @@ +.backdrop { + position: fixed; + inset: 0; + background: rgba(0, 0, 0, 0.15); + z-index: 99; + animation: fadeIn 0.2s ease-out; +} + +@keyframes fadeIn { + from { opacity: 0; } + to { opacity: 1; } +} + .panel { position: fixed; top: 0; diff --git a/src/design-system/composites/DetailPanel/DetailPanel.tsx b/src/design-system/composites/DetailPanel/DetailPanel.tsx index e5dfe04..5363064 100644 --- a/src/design-system/composites/DetailPanel/DetailPanel.tsx +++ b/src/design-system/composites/DetailPanel/DetailPanel.tsx @@ -23,51 +23,54 @@ export function DetailPanel({ open, onClose, title, tabs, children, actions, cla const activeContent = tabs?.find((t) => t.value === activeTab)?.content - const panel = ( - + ) // Portal to AppShell level if target exists, otherwise render in place const portalTarget = document.getElementById('cameleer-detail-panel-root') - return portalTarget ? createPortal(panel, portalTarget) : panel + return portalTarget ? createPortal(content, portalTarget) : content }