From 396acf3bbbe00a192cb0ea0a9ccf91b1d8d2850b Mon Sep 17 00:00:00 2001
From: Fuwn <50817549+Fuwn@users.noreply.github.com>
Date: Sat, 24 Jan 2026 13:09:50 +0000
Subject: Initial commit

Created from https://vercel.com/new
---
 src/components/common/Panel.tsx | 64 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 src/components/common/Panel.tsx

(limited to 'src/components/common/Panel.tsx')

diff --git a/src/components/common/Panel.tsx b/src/components/common/Panel.tsx
new file mode 100644
index 0000000..bb66746
--- /dev/null
+++ b/src/components/common/Panel.tsx
@@ -0,0 +1,64 @@
+import {
+  Button,
+  Column,
+  type ColumnProps,
+  Heading,
+  Icon,
+  Row,
+  Tooltip,
+  TooltipTrigger,
+} from '@umami/react-zen';
+import { useState } from 'react';
+import { useMessages } from '@/components/hooks';
+import { Maximize, X } from '@/components/icons';
+
+export interface PanelProps extends ColumnProps {
+  title?: string;
+  allowFullscreen?: boolean;
+}
+
+const fullscreenStyles = {
+  position: 'fixed',
+  width: '100%',
+  height: '100%',
+  top: 0,
+  left: 0,
+  border: 'none',
+  zIndex: 9999,
+} as any;
+
+export function Panel({ title, allowFullscreen, style, children, ...props }: PanelProps) {
+  const { formatMessage, labels } = useMessages();
+  const [isFullscreen, setIsFullscreen] = useState(false);
+
+  const handleFullscreen = () => {
+    setIsFullscreen(!isFullscreen);
+  };
+
+  return (
+    <Column
+      paddingY="6"
+      paddingX={{ xs: '3', md: '6' }}
+      border
+      borderRadius="3"
+      backgroundColor
+      position="relative"
+      gap
+      {...props}
+      style={{ ...style, ...(isFullscreen ? fullscreenStyles : {}) }}
+    >
+      {title && <Heading>{title}</Heading>}
+      {allowFullscreen && (
+        <Row justifyContent="flex-end" alignItems="center">
+          <TooltipTrigger delay={0} isDisabled={isFullscreen}>
+            <Button size="sm" variant="quiet" onPress={handleFullscreen}>
+              <Icon>{isFullscreen ? <X /> : <Maximize />}</Icon>
+            </Button>
+            <Tooltip>{formatMessage(labels.maximize)}</Tooltip>
+          </TooltipTrigger>
+        </Row>
+      )}
+      {children}
+    </Column>
+  );
+}
-- 
cgit v1.2.3

