/** * Reusable bordered panel component. */ import { useLayout } from '../context'; import { Box, Text } from 'ink'; import type { ReactNode } from 'react'; export interface PanelProps { title?: string; children: ReactNode; borderColor?: string; height?: number; flexGrow?: number; flexBasis?: number | string; /** If true, panel fills available width instead of using contentWidth */ fullWidth?: boolean; } export function Panel({ title, children, borderColor, height, flexGrow, flexBasis, fullWidth = false }: PanelProps) { const { contentWidth } = useLayout(); return ( {title && ( {title} )} {children} ); }