1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2024-11-10 11:35:52 +01:00

fix: Use React.FC as react-dom is not able to infer types of Modal (#5479)

This commit is contained in:
Aakansha Doshi 2022-07-22 13:09:15 +05:30 committed by GitHub
parent 15d79f8fee
commit 58845e450a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);