fix: Excalidraw named export type (#5078)

This commit is contained in:
David Luzar 2022-04-22 15:49:36 +02:00 committed by GitHub
parent a66cfe2627
commit 9423ac3263
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 9 deletions

View file

@ -1,6 +1,3 @@
import Excalidraw from "./index";
import "../../../public/fonts.css";
export { Excalidraw };
export * from "./index";

View file

@ -13,7 +13,7 @@ import { DEFAULT_UI_OPTIONS } from "../../constants";
import { Provider } from "jotai";
import { jotaiScope, jotaiStore } from "../../jotai";
const Excalidraw = (props: ExcalidrawProps) => {
const ExcalidrawBase = (props: ExcalidrawProps) => {
const {
onChange,
initialData,
@ -173,8 +173,10 @@ const areEqual = (
const forwardedRefComp = forwardRef<
ExcalidrawAPIRefValue,
PublicExcalidrawProps
>((props, ref) => <Excalidraw {...props} excalidrawRef={ref} />);
export default React.memo(forwardedRefComp, areEqual);
>((props, ref) => <ExcalidrawBase {...props} excalidrawRef={ref} />);
export const Excalidraw = React.memo(forwardedRefComp, areEqual);
export {
getSceneVersion,
isInvisiblySmallElement,