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

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

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

diff --git a/packages/excalidraw/components/LibraryMenuBrowseButton.tsx b/packages/excalidraw/components/LibraryMenuBrowseButton.tsx
new file mode 100644
index 0000000..43fbedd
--- /dev/null
+++ b/packages/excalidraw/components/LibraryMenuBrowseButton.tsx
@@ -0,0 +1,31 @@
+import { VERSIONS } from "../constants";
+import { t } from "../i18n";
+import type { ExcalidrawProps, UIAppState } from "../types";
+
+const LibraryMenuBrowseButton = ({
+  theme,
+  id,
+  libraryReturnUrl,
+}: {
+  libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
+  theme: UIAppState["theme"];
+  id: string;
+}) => {
+  const referrer =
+    libraryReturnUrl || window.location.origin + window.location.pathname;
+  return (
+    <a
+      className="library-menu-browse-button"
+      href={`${import.meta.env.VITE_APP_LIBRARY_URL}?target=${
+        window.name || "_blank"
+      }&referrer=${referrer}&useHash=true&token=${id}&theme=${theme}&version=${
+        VERSIONS.excalidrawLibrary
+      }`}
+      target="_excalidraw_libraries"
+    >
+      {t("labels.libraries")}
+    </a>
+  );
+};
+
+export default LibraryMenuBrowseButton;
-- 
cgit v1.2.3

