Skip to content

Commit 11caa74

Browse files
committed
Revert "[@mantine/modals] Fix types of context modals inferred incorrectly (#8625)"
This reverts commit 889265e.
1 parent c8a31a4 commit 11caa74

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

packages/@mantine/modals/src/context.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,15 @@ export interface ModalsContextProps {
4141

4242
export interface MantineModalsOverride {}
4343

44-
export type MantineModals = MantineModalsOverride extends { modals: infer M }
45-
? M
46-
: Record<string, React.FC<ContextModalProps<any>>>;
44+
export type MantineModalsOverwritten = MantineModalsOverride extends {
45+
modals: Record<string, React.FC<ContextModalProps<any>>>;
46+
}
47+
? MantineModalsOverride
48+
: {
49+
modals: Record<string, React.FC<ContextModalProps<any>>>;
50+
};
51+
52+
export type MantineModals = MantineModalsOverwritten['modals'];
4753

4854
export type MantineModal = keyof MantineModals;
4955

0 commit comments

Comments
 (0)