mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
28 lines
685 B
TypeScript
28 lines
685 B
TypeScript
import App from "./components/ExampleApp";
|
|
import React, { StrictMode } from "react";
|
|
import { createRoot } from "react-dom/client";
|
|
|
|
import type * as TExcalidraw from "@excalidraw/excalidraw";
|
|
|
|
import "@excalidraw/excalidraw/index.css";
|
|
|
|
declare global {
|
|
interface Window {
|
|
ExcalidrawLib: typeof TExcalidraw;
|
|
}
|
|
}
|
|
|
|
const rootElement = document.getElementById("root")!;
|
|
const root = createRoot(rootElement);
|
|
const { Excalidraw } = window.ExcalidrawLib;
|
|
root.render(
|
|
<StrictMode>
|
|
<App
|
|
appTitle={"Excalidraw Example"}
|
|
useCustom={(api: any, args?: any[]) => {}}
|
|
excalidrawLib={window.ExcalidrawLib}
|
|
>
|
|
<Excalidraw />
|
|
</App>
|
|
</StrictMode>,
|
|
);
|