Breakdown report.

This commit is contained in:
Mike Cao 2025-06-10 20:59:27 -07:00
parent 79ea9974b7
commit e3cc19638c
21 changed files with 495 additions and 456 deletions

View file

@ -7,11 +7,13 @@ import {
Button,
TooltipTrigger,
Tooltip,
Heading,
} from '@umami/react-zen';
import { Maximize, Close } from '@/components/icons';
import { useMessages } from '@/components/hooks';
export interface PanelProps extends ColumnProps {
title?: string;
allowFullscreen?: boolean;
}
@ -25,7 +27,7 @@ const fullscreenStyles = {
zIndex: 9999,
} as any;
export function Panel({ allowFullscreen, style, children, ...props }: PanelProps) {
export function Panel({ title, allowFullscreen, style, children, ...props }: PanelProps) {
const { formatMessage, labels } = useMessages();
const [isFullscreen, setIsFullscreen] = useState(false);
@ -44,6 +46,7 @@ export function Panel({ allowFullscreen, style, children, ...props }: PanelProps
{...props}
style={{ ...style, ...(isFullscreen ? fullscreenStyles : {}) }}
>
{title && <Heading>{title}</Heading>}
{allowFullscreen && (
<Row justifyContent="flex-end" alignItems="center">
<TooltipTrigger delay={0} isDisabled={isFullscreen}>