You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
728 B
30 lines
728 B
import React from "react"; |
|
|
|
import type * as TExcalidraw from "@excalidraw/excalidraw"; |
|
import type { ExcalidrawImperativeAPI } from "@excalidraw/excalidraw/types"; |
|
|
|
import CustomFooter from "./CustomFooter"; |
|
|
|
const MobileFooter = ({ |
|
excalidrawAPI, |
|
excalidrawLib, |
|
}: { |
|
excalidrawAPI: ExcalidrawImperativeAPI; |
|
excalidrawLib: typeof TExcalidraw; |
|
}) => { |
|
const { useEditorInterface, Footer } = excalidrawLib; |
|
|
|
const editorInterface = useEditorInterface(); |
|
if (editorInterface.formFactor === "phone") { |
|
return ( |
|
<Footer> |
|
<CustomFooter |
|
excalidrawAPI={excalidrawAPI} |
|
excalidrawLib={excalidrawLib} |
|
/> |
|
</Footer> |
|
); |
|
} |
|
return null; |
|
}; |
|
export default MobileFooter;
|
|
|