From 58845e450a850c34f65807117db181ade4e2d88e Mon Sep 17 00:00:00 2001 From: Aakansha Doshi Date: Fri, 22 Jul 2022 13:09:15 +0530 Subject: [PATCH] fix: Use React.FC as react-dom is not able to infer types of Modal (#5479) --- src/components/Modal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Modal.tsx b/src/components/Modal.tsx index 0c3fc22ac4..325fe28014 100644 --- a/src/components/Modal.tsx +++ b/src/components/Modal.tsx @@ -8,7 +8,7 @@ import { useExcalidrawContainer, useDevice } from "./App"; import { AppState } from "../types"; import { THEME } from "../constants"; -export const Modal = (props: { +export const Modal: React.FC<{ className?: string; children: React.ReactNode; maxWidth?: number; @@ -16,7 +16,7 @@ export const Modal = (props: { labelledBy: string; theme?: AppState["theme"]; closeOnClickOutside?: boolean; -}) => { +}> = (props) => { const { theme = THEME.LIGHT, closeOnClickOutside = true } = props; const modalRoot = useBodyRoot(theme);