From 6ec259a0e71174651bae95d4628138bf6fd68742 Mon Sep 17 00:00:00 2001
From: kj_sh604
Date: Sun, 15 Mar 2026 16:19:35 -0400
Subject: refactor: packages/

---
 packages/excalidraw/components/LoadingMessage.tsx | 40 +++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 packages/excalidraw/components/LoadingMessage.tsx

(limited to 'packages/excalidraw/components/LoadingMessage.tsx')

diff --git a/packages/excalidraw/components/LoadingMessage.tsx b/packages/excalidraw/components/LoadingMessage.tsx
new file mode 100644
index 0000000..b007252
--- /dev/null
+++ b/packages/excalidraw/components/LoadingMessage.tsx
@@ -0,0 +1,40 @@
+import { t } from "../i18n";
+import { useState, useEffect } from "react";
+import Spinner from "./Spinner";
+import clsx from "clsx";
+import { THEME } from "../constants";
+import type { Theme } from "../element/types";
+
+export const LoadingMessage: React.FC<{ delay?: number; theme?: Theme }> = ({
+  delay,
+  theme,
+}) => {
+  const [isWaiting, setIsWaiting] = useState(!!delay);
+
+  useEffect(() => {
+    if (!delay) {
+      return;
+    }
+    const timer = setTimeout(() => {
+      setIsWaiting(false);
+    }, delay);
+    return () => clearTimeout(timer);
+  }, [delay]);
+
+  if (isWaiting) {
+    return null;
+  }
+
+  return (
+    <div
+      className={clsx("LoadingMessage", {
+        "LoadingMessage--dark": theme === THEME.DARK,
+      })}
+    >
+      <div>
+        <Spinner />
+      </div>
+      <div className="LoadingMessage-text">{t("labels.loadingScene")}</div>
+    </div>
+  );
+};
-- 
cgit v1.2.3

