mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
28 lines
683 B
TypeScript
28 lines
683 B
TypeScript
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 (
|
|
<Footer>
|
|
<CustomFooter
|
|
excalidrawAPI={excalidrawAPI}
|
|
excalidrawLib={excalidrawLib}
|
|
/>
|
|
</Footer>
|
|
);
|
|
}
|
|
return null;
|
|
};
|
|
export default MobileFooter;
|