Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 45d881b

Browse files
authored
Fix types of ModuleApi::openDialog (#17)
1 parent 3aff89a commit 45d881b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ModuleApi.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717
import React from "react";
1818

1919
import { PlainSubstitution, TranslationStringsObject } from "./types/translations";
20-
import { DialogProps } from "./components/DialogContent";
20+
import { DialogContent, DialogProps } from "./components/DialogContent";
2121
import { AccountAuthInfo } from "./types/AccountAuthInfo";
2222

2323
/**
@@ -52,7 +52,7 @@ export interface ModuleApi {
5252
* @returns Whether the user submitted the dialog or closed it, and the model returned by the
5353
* dialog component if submitted.
5454
*/
55-
openDialog<M extends object, P extends DialogProps = DialogProps, C extends React.Component = React.Component>(
55+
openDialog<M extends object, P extends DialogProps = DialogProps, C extends DialogContent<P> = DialogContent<P>>(
5656
title: string,
5757
body: (props: P, ref: React.RefObject<C>) => React.ReactNode,
5858
props?: Omit<P, keyof DialogProps>,

0 commit comments

Comments
 (0)