From 225db4a7805befe009fe055fc2ef5daedd6c04f9 Mon Sep 17 00:00:00 2001 From: kj_sh604 Date: Sun, 15 Mar 2026 16:19:35 -0400 Subject: refactor: examples/ --- .../components/MobileFooter.tsx | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 examples/with-script-in-browser/components/MobileFooter.tsx (limited to 'examples/with-script-in-browser/components/MobileFooter.tsx') diff --git a/examples/with-script-in-browser/components/MobileFooter.tsx b/examples/with-script-in-browser/components/MobileFooter.tsx new file mode 100644 index 0000000..c8fc0f1 --- /dev/null +++ b/examples/with-script-in-browser/components/MobileFooter.tsx @@ -0,0 +1,28 @@ +import React from "react"; +import type { ExcalidrawImperativeAPI } from "@excalidraw/excalidraw/types"; +import CustomFooter from "./CustomFooter"; +import type * as TExcalidraw from "@excalidraw/excalidraw"; + +const MobileFooter = ({ + excalidrawAPI, + excalidrawLib, +}: { + excalidrawAPI: ExcalidrawImperativeAPI; + excalidrawLib: typeof TExcalidraw; +}) => { + const { useDevice, Footer } = excalidrawLib; + + const device = useDevice(); + if (device.editor.isMobile) { + return ( + + ); + } + return null; +}; +export default MobileFooter; -- cgit v1.2.3