/** * Floating Panels Demo * Mutually exclusive overlay panels */ import React, { useState } from 'react' export default function FloatingPanelsDemo() { const [activePanel, setActivePanel] = useState(null) const panels = [ { id: 'issues', title: 'Issues + Queue', side: 'left', width: 400 }, { id: 'queue', title: 'Queue', side: 'right', width: 320 }, { id: 'inspector', title: 'Inspector', side: 'right', width: 280 }, { id: 'execution', title: 'Execution Monitor', side: 'right', width: 300 }, { id: 'scheduler', title: 'Scheduler', side: 'right', width: 260 }, ] return (

Floating Panels

{panels.map((panel) => ( ))}

{activePanel ? `"${panels.find((p) => p.id === activePanel)?.title}" panel is open` : 'Click a button to open a floating panel'}

{/* Floating Panel Overlay */} {activePanel && (
p.id === activePanel)?.side === 'left' ? 'left-6' : 'right-6' }`} style={{ width: panels.find((p) => p.id === activePanel)?.width }} >
{panels.find((p) => p.id === activePanel)?.title}
Item 1
Item 2
Item 3
)}
) }